From dadd6ad1ceaa7aebc0df2f69a24e72717d71d4fe Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 19 Jun 2006 15:54:30 +0000 Subject: [PATCH] Better fix for LITEDIR bug git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4145 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-lite/shorewall-lite | 2 ++ Shorewall/functions | 2 -- Shorewall/shorewall | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) 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}