From 10ff1f4c4f6ab2ce17f3d0c6b36c2bd7b73c2570 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 21 Jul 2007 14:03:37 +0000 Subject: [PATCH] Fix uninstallers git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6917 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-common/changelog.txt | 2 ++ Shorewall-common/releasenotes.txt | 16 +++++++++++++++- Shorewall-common/uninstall.sh | 2 +- Shorewall-lite/uninstall.sh | 18 +++++++++--------- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Shorewall-common/changelog.txt b/Shorewall-common/changelog.txt index 3c9c35f6a..1f0e231c2 100644 --- a/Shorewall-common/changelog.txt +++ b/Shorewall-common/changelog.txt @@ -2,6 +2,8 @@ Changes in 4.0.1 1) Add EXPAND_POLICIES. +2) Fix uninstallers. + Changes in 4.0.0 Final 1) Fix lite install.sh manpage problem. diff --git a/Shorewall-common/releasenotes.txt b/Shorewall-common/releasenotes.txt index 600f8c786..40c6c5c3a 100644 --- a/Shorewall-common/releasenotes.txt +++ b/Shorewall-common/releasenotes.txt @@ -27,7 +27,21 @@ Shorewall 4.0.1 Problems corrected in 4.0.1. -None. +1) The Shorewall Lite installer was producing an empty shorewall-lite + manpage. Since the installer runs as part of creating the RPM, the + RPM also suffered from this problem. The 4.0.0 Shorewall-lite + packages were re-uploaded with this problem corrected. + +2) The Shorewall Lite uninstaller incorrectly removed /sbin/shorewall + rather than /sbin/shorewall-lite. + +3) Both the Shorewall and Shorewall Lite uninstallers did a "shorewall + clear" if Shorewall [Lite] was running. Now, the Shorewall Lite + uninstaller correctly does "shorewall-lite clear" and both + uninstallers only perform the 'clear' operation if the other + product is not installed. This prevents the removal of one of the + two products from clearing the firewall configuration established + by the other one. Other changes in Shorewall 4.0.1. diff --git a/Shorewall-common/uninstall.sh b/Shorewall-common/uninstall.sh index 2725f3b2e..bb3c978bc 100755 --- a/Shorewall-common/uninstall.sh +++ b/Shorewall-common/uninstall.sh @@ -74,7 +74,7 @@ fi echo "Uninstalling shorewall $VERSION" -if qt iptables -L shorewall -n; then +if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall-lite ]; then /sbin/shorewall clear fi diff --git a/Shorewall-lite/uninstall.sh b/Shorewall-lite/uninstall.sh index 19b67a77f..430aa6663 100755 --- a/Shorewall-lite/uninstall.sh +++ b/Shorewall-lite/uninstall.sh @@ -43,7 +43,7 @@ qt() restore_file() # $1 = file to restore { if [ -f ${1}-shorewall.bkout ]; then - if (mv -f ${1}-shorewall.bkout $1); then + if (mv -f ${1}-shorewall-lite.bkout $1); then echo echo "$1 restored" else @@ -63,25 +63,25 @@ remove_file() # $1 = file to restore if [ -f /usr/share/shorewall-lite/version ]; then INSTALLED_VERSION="$(cat /usr/share/shorewall-lite/version)" if [ "$INSTALLED_VERSION" != "$VERSION" ]; then - echo "WARNING: Shorewall Version $INSTALLED_VERSION is installed" + echo "WARNING: Shorewall Lite Version $INSTALLED_VERSION is installed" echo " and this is the $VERSION uninstaller." VERSION="$INSTALLED_VERSION" fi else - echo "WARNING: Shorewall Version $VERSION is not installed" + echo "WARNING: Shorewall Lite Version $VERSION is not installed" VERSION="" fi -echo "Uninstalling shorewall $VERSION" +echo "Uninstalling Shorewall Lite $VERSION" -if qt iptables -L shorewall -n; then - /sbin/shorewall clear +if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall ]; then + /sbin/shorewall-lite clear fi if [ -L /usr/share/shorewall-lite/init ]; then FIREWALL=$(ls -l /usr/share/shorewall-lite/init | sed 's/^.*> //') else - FIREWALL=/etc/init.d/shorewall + FIREWALL=/etc/init.d/shorewall-lite fi if [ -n "$FIREWALL" ]; then @@ -97,8 +97,8 @@ if [ -n "$FIREWALL" ]; then rm -f ${FIREWALL}-*.bkout fi -rm -f /sbin/shorewall -rm -f /sbin/shorewall-*.bkout +rm -f /sbin/shorewall-lite +rm -f /sbin/shorewall-lite-*.bkout rm -rf /etc/shorewall-lite rm -rf /etc/shorewall-lite-*.bkout