Fix uninstallers

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6917 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-07-21 14:03:37 +00:00
parent 7629239b71
commit 10ff1f4c4f
4 changed files with 27 additions and 11 deletions

View File

@ -2,6 +2,8 @@ Changes in 4.0.1
1) Add EXPAND_POLICIES. 1) Add EXPAND_POLICIES.
2) Fix uninstallers.
Changes in 4.0.0 Final Changes in 4.0.0 Final
1) Fix lite install.sh manpage problem. 1) Fix lite install.sh manpage problem.

View File

@ -27,7 +27,21 @@ Shorewall 4.0.1
Problems corrected in 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. Other changes in Shorewall 4.0.1.

View File

@ -74,7 +74,7 @@ fi
echo "Uninstalling shorewall $VERSION" 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 /sbin/shorewall clear
fi fi

View File

@ -43,7 +43,7 @@ qt()
restore_file() # $1 = file to restore restore_file() # $1 = file to restore
{ {
if [ -f ${1}-shorewall.bkout ]; then 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
echo "$1 restored" echo "$1 restored"
else else
@ -63,25 +63,25 @@ remove_file() # $1 = file to restore
if [ -f /usr/share/shorewall-lite/version ]; then if [ -f /usr/share/shorewall-lite/version ]; then
INSTALLED_VERSION="$(cat /usr/share/shorewall-lite/version)" INSTALLED_VERSION="$(cat /usr/share/shorewall-lite/version)"
if [ "$INSTALLED_VERSION" != "$VERSION" ]; then 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." echo " and this is the $VERSION uninstaller."
VERSION="$INSTALLED_VERSION" VERSION="$INSTALLED_VERSION"
fi fi
else else
echo "WARNING: Shorewall Version $VERSION is not installed" echo "WARNING: Shorewall Lite Version $VERSION is not installed"
VERSION="" VERSION=""
fi fi
echo "Uninstalling shorewall $VERSION" echo "Uninstalling Shorewall Lite $VERSION"
if qt iptables -L shorewall -n; then if qt iptables -L shorewall -n && [ ! -f /sbin/shorewall ]; then
/sbin/shorewall clear /sbin/shorewall-lite clear
fi fi
if [ -L /usr/share/shorewall-lite/init ]; then if [ -L /usr/share/shorewall-lite/init ]; then
FIREWALL=$(ls -l /usr/share/shorewall-lite/init | sed 's/^.*> //') FIREWALL=$(ls -l /usr/share/shorewall-lite/init | sed 's/^.*> //')
else else
FIREWALL=/etc/init.d/shorewall FIREWALL=/etc/init.d/shorewall-lite
fi fi
if [ -n "$FIREWALL" ]; then if [ -n "$FIREWALL" ]; then
@ -97,8 +97,8 @@ if [ -n "$FIREWALL" ]; then
rm -f ${FIREWALL}-*.bkout rm -f ${FIREWALL}-*.bkout
fi fi
rm -f /sbin/shorewall rm -f /sbin/shorewall-lite
rm -f /sbin/shorewall-*.bkout rm -f /sbin/shorewall-lite-*.bkout
rm -rf /etc/shorewall-lite rm -rf /etc/shorewall-lite
rm -rf /etc/shorewall-lite-*.bkout rm -rf /etc/shorewall-lite-*.bkout