Add "" around variables in test(1) cases to prevent errors when a variable is unset

This commit is contained in:
Lars Engels
2019-12-11 20:35:05 +01:00
parent 3f7573825d
commit 5b11f81a1b
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ for _jail in ${JAILS}; do
## test if running
elif [ $(jls name | grep -w "${_jail}") ]; then
## remove ip4.addr from firewall table:jails
if [ ! -z ${bastille_jail_loopback} ]; then
if [ ! -z "${bastille_jail_loopback}" ]; then
pfctl -q -t jails -T delete $(jls -j ${_jail} ip4.addr)
fi