1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

Improve bash quoting, and other similar best practices

This patch updates the shell scripts with some of the common best
practices, which should make them more resilient to unusual failures and
unexpected environments (in particular, directories with spaces).

Most of these were identified by shellcheck.
This commit is contained in:
Alberto Bertogli
2022-11-13 00:37:28 +00:00
parent e2481b07a9
commit 948cee1ce1
32 changed files with 133 additions and 126 deletions

View File

@@ -5,19 +5,19 @@
# given the nature of these tests that's acceptable for now.
set -e
. $(dirname ${0})/../util/lib.sh
. "$(dirname "$0")/../util/lib.sh"
init
# Download and extract the package in .exim-bin
apt download exim4-daemon-light
dpkg -x exim4-daemon-light_*.deb $PWD/.exim-bin/
dpkg -x exim4-daemon-light_*.deb "$PWD/.exim-bin/"
# Create a symlink to .exim4, which is the directory we will use to store
# configuration, spool, etc.
# The configuration template will look for it here.
mkdir -p .exim4
ln -sf $PWD/.exim-bin/usr/sbin/exim4 .exim4/
ln -sf "$PWD/.exim-bin/usr/sbin/exim4" .exim4/
# Remove the setuid bit, if there is one - we don't need it and may cause
# confusion and/or security troubles.

View File

@@ -23,7 +23,7 @@
# chasquid will receive the email from exim, and deliver it locally.
set -e
. $(dirname ${0})/../util/lib.sh
. "$(dirname "$0")/../util/lib.sh"
init
check_hostaliases