From e2748d32451661db38b64d088333ab71f96d7c7b Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 8 Mar 2003 18:01:32 +0000 Subject: [PATCH] More SHARED_DIR changes git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@489 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 8 ++++---- Shorewall/shorewall | 24 ++++++++++-------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 9f2212efd..c88dbc7e3 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -4311,6 +4311,10 @@ do_initialize() { startup_error "$FUNCTIONS does not exist!" fi + VERSION_FILE=$SHARED_DIR/version + + [ -f $VERSION_FILE ] && version=`cat $VERSION_FILE` + run_user_exit params config=`find_file shorewall.conf` @@ -4323,10 +4327,6 @@ do_initialize() { exit 2 fi - VERSION_FILE=$SHARED_DIR/version - - [ -f $VERSION_FILE ] && version=`cat $VERSION_FILE` - [ -z "${STATEDIR}" ] && STATEDIR=/var/state/shorewall [ -d $STATEDIR ] || mkdir -p $STATEDIR diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 6e447f0ee..27e60db9b 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -571,24 +571,11 @@ fi [ -n "$SHOREWALL_DIR" ] && export SHOREWALL_DIR PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin -SHARED_DIR=/usr/share/shorewall MUTEX_TIMEOUT= -if [ -n "$SHOREWALL_DIR" -a -f $SHOREWALL_DIR/shorewall.conf ]; then - config=$SHOREWALL_DIR/shorewall.conf -else - config=/etc/shorewall/shorewall.conf -fi - -if [ -f $config ]; then - . $config -else - echo "$config does not exist!" >&2 - exit 2 -fi - [ -z "${STATEDIR}" ] && STATEDIR=/var/state/shorewall +SHARED_DIR=/usr/share/shorewall FIREWALL=$SHARED_DIR/firewall FUNCTIONS=$SHARED_DIR/functions VERSION_FILE=$SHARED_DIR/version @@ -600,6 +587,15 @@ else exit 2 fi +config=`find_file shorewall.conf` + +if [ -f $config ]; then + . $config +else + echo "$config does not exist!" >&2 + exit 2 +fi + if [ ! -f $FIREWALL ]; then echo "ERROR: Shorewall is not properly installed" if [ -L $FIREWALL ]; then