diff --git a/Shorewall-lite/shorewall-lite b/Shorewall-lite/shorewall-lite index 4e9281677..c4fc7fc7d 100755 --- a/Shorewall-lite/shorewall-lite +++ b/Shorewall-lite/shorewall-lite @@ -1206,6 +1206,8 @@ fi ensure_config_path export CONFIG_PATH +[ -n "$LITEDIR" ] || { echo " ERROR: LITEDIR not defined in ${SHAREDIR}/configpath" >&2; exit 2; } + get_config FIREWALL=$LITEDIR/firewall diff --git a/Shorewall/functions b/Shorewall/functions index 9f2e4a29c..8db8113a1 100644 --- a/Shorewall/functions +++ b/Shorewall/functions @@ -219,8 +219,6 @@ ensure_config_path() { [ -f $F ] || { echo " ERROR: $F does not exist"; exit 2; } . $F fi - - [ -n "$LITEDIR" ] || { echo " ERROR: LITEDIR not defined in $F"; exit 2; } } # diff --git a/Shorewall/shorewall b/Shorewall/shorewall index b1dd7e36e..2cb8a006e 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -200,7 +200,6 @@ get_config() { # This block is avoided for compile for export and when the user isn't root # export CONFIG_PATH - export LITEDIR [ -z "$LOGFILE" ] && LOGFILE=/var/log/messages @@ -1306,6 +1305,8 @@ reload_command() { local verbose=$(make_verbose) + [ -n "$LITEDIR" ] || { echo " ERROR: LITEDIR not defined in ${SHAREDIR}/configpath" >&2; exit 2; } + if shorewall $debugging $verbose compile -e $1 $1/firewall && \ echo "Copying ${1}/firewall to ${2}:${LITEDIR}..." && \ scp $1/firewall root@${2}:${LITEDIR}