From 395f60e729cfcedfcb3e381a77762494e9539046 Mon Sep 17 00:00:00 2001 From: teastep Date: Tue, 15 Oct 2002 16:43:34 +0000 Subject: [PATCH] Fixes for install, uninstall and fallback scripts git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@299 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/fallback.sh | 3 ++- Shorewall/install.sh | 2 +- Shorewall/uninstall.sh | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Shorewall/fallback.sh b/Shorewall/fallback.sh index bb46fec12..369c2cc4f 100755 --- a/Shorewall/fallback.sh +++ b/Shorewall/fallback.sh @@ -49,7 +49,8 @@ restore_file() # $1 = file to restore fi } -if [ ! -f /var/lib/shorewall/version-${VERSION}.bkout -a \ +if [ ! -f /usr/lib/shorewall/version-${VERSION}.bkout -a \ + ! -f /var/lib/shorewall/version-${VERSION}.bkout -a \ ! -f /etc/shorewall/version-${VERSION}.bkout ]; then echo "Shorewall Version $VERSION is not installed" exit 1 diff --git a/Shorewall/install.sh b/Shorewall/install.sh index f88d78315..615d82adf 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -476,7 +476,7 @@ chmod 644 ${PREFIX}/usr/lib/shorewall/version if [ -z "$PREFIX" ]; then rm -f /etc/shorewall/firewall rm -f /var/lib/shorewall/firewall - [ -L /usr/lib/shorewall/firewall] && \ + [ -L /usr/lib/shorewall/firewall ] && \ mv -f /usr/lib/shorewall/firewall /usr/lib/shorewall/firewall-${VERSION}.bkout rm -f /usr/lib/shorewall/init ln -s ${DEST}/${FIREWALL} /usr/lib/shorewall/init diff --git a/Shorewall/uninstall.sh b/Shorewall/uninstall.sh index 5b3e29045..ede0de369 100755 --- a/Shorewall/uninstall.sh +++ b/Shorewall/uninstall.sh @@ -60,8 +60,8 @@ remove_file() # $1 = file to restore fi } -if [ -f /var/lib/shorewall/version ]; then - INSTALLED_VERSION="`cat /var/lib/shorewall/version`" +if [ -f /usr/lib/shorewall/version ]; then + INSTALLED_VERSION="`cat /usr/lib/shorewall/version`" if [ "$INSTALLED_VERSION" != "$VERSION" ]; then echo "WARNING: Shorewall Version $INSTALLED_VERSION is installed" echo " and this is the $VERSION uninstaller."