From 44142ed45712b572b581ebcbf2132727fa494d8d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 2 Apr 2015 07:27:57 -0700 Subject: [PATCH 1/3] Apply Matt Darfeuille's uninstall fixes Signed-off-by: Tom Eastep --- Shorewall/uninstall.sh | 2 +- Shorewall6/uninstall.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall/uninstall.sh b/Shorewall/uninstall.sh index c1dce12fd..1e4a668ed 100755 --- a/Shorewall/uninstall.sh +++ b/Shorewall/uninstall.sh @@ -197,7 +197,7 @@ fi rm -rf ${VARDIR}/shorewall rm -rf ${PERLLIBDIR}/Shorewall/* -rm -rf ${LIBEXECDIR}/shorewall +[ ${LIBEXECDIR} = ${SHAREDIR} ] || rm -rf ${LIBEXECDIR}/shorewall rm -rf ${SHAREDIR}/shorewall/configfiles/ rm -rf ${SHAREDIR}/shorewall/Samples/ rm -rf ${SHAREDIR}/shorewall/Shorewall/ diff --git a/Shorewall6/uninstall.sh b/Shorewall6/uninstall.sh index f710ee7bb..111d388da 100755 --- a/Shorewall6/uninstall.sh +++ b/Shorewall6/uninstall.sh @@ -136,7 +136,7 @@ else usage 1 fi -if [ -f ${SHARDIR}/shorewall6/version ]; then +if [ -f ${SHAREDIR}/shorewall6/version ]; then INSTALLED_VERSION="$(cat /usr/share/shorewall6/version)" if [ "$INSTALLED_VERSION" != "$VERSION" ]; then echo "WARNING: Shorewall6 Version $INSTALLED_VERSION is installed" From a8026999a5767c7bb16aae95b3be6c9861f49d08 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 2 Apr 2015 07:47:53 -0700 Subject: [PATCH 2/3] Another fix for the Shorewall6 uninstaller Signed-off-by: Tom Eastep --- Shorewall6/uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall6/uninstall.sh b/Shorewall6/uninstall.sh index 111d388da..dc4c25daf 100755 --- a/Shorewall6/uninstall.sh +++ b/Shorewall6/uninstall.sh @@ -137,7 +137,7 @@ else fi if [ -f ${SHAREDIR}/shorewall6/version ]; then - INSTALLED_VERSION="$(cat /usr/share/shorewall6/version)" + INSTALLED_VERSION="$(cat ${SHAREDIR}/shorewall6/version)" if [ "$INSTALLED_VERSION" != "$VERSION" ]; then echo "WARNING: Shorewall6 Version $INSTALLED_VERSION is installed" echo " and this is the $VERSION uninstaller." From eb3a1625605f571252f05449d6c781df7f641124 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 2 Apr 2015 13:26:51 -0700 Subject: [PATCH 3/3] Apply Matt Darfeuille's fix for fatal_error() Signed-off-by: Tom Eastep --- Shorewall-core/uninstall.sh | 6 ++++++ Shorewall-init/uninstall.sh | 6 ++++++ Shorewall-lite/uninstall.sh | 6 ++++++ Shorewall/uninstall.sh | 6 ++++++ Shorewall6-lite/uninstall.sh | 6 ++++++ Shorewall6/uninstall.sh | 6 ++++++ 6 files changed, 36 insertions(+) diff --git a/Shorewall-core/uninstall.sh b/Shorewall-core/uninstall.sh index bb28110e3..876fd19b1 100755 --- a/Shorewall-core/uninstall.sh +++ b/Shorewall-core/uninstall.sh @@ -35,6 +35,12 @@ usage() # $1 = exit status exit $1 } +fatal_error() +{ + echo " ERROR: $@" >&2 + exit 1 +} + qt() { "$@" >/dev/null 2>&1 diff --git a/Shorewall-init/uninstall.sh b/Shorewall-init/uninstall.sh index 6171017c7..f926265c0 100755 --- a/Shorewall-init/uninstall.sh +++ b/Shorewall-init/uninstall.sh @@ -35,6 +35,12 @@ usage() # $1 = exit status exit $1 } +fatal_error() +{ + echo " ERROR: $@" >&2 + exit 1 +} + qt() { "$@" >/dev/null 2>&1 diff --git a/Shorewall-lite/uninstall.sh b/Shorewall-lite/uninstall.sh index d84bc4132..ebcf8da04 100755 --- a/Shorewall-lite/uninstall.sh +++ b/Shorewall-lite/uninstall.sh @@ -40,6 +40,12 @@ usage() # $1 = exit status exit $1 } +fatal_error() +{ + echo " ERROR: $@" >&2 + exit 1 +} + qt() { "$@" >/dev/null 2>&1 diff --git a/Shorewall/uninstall.sh b/Shorewall/uninstall.sh index 1e4a668ed..2b31f4fce 100755 --- a/Shorewall/uninstall.sh +++ b/Shorewall/uninstall.sh @@ -40,6 +40,12 @@ usage() # $1 = exit status exit $1 } +fatal_error() +{ + echo " ERROR: $@" >&2 + exit 1 +} + qt() { "$@" >/dev/null 2>&1 diff --git a/Shorewall6-lite/uninstall.sh b/Shorewall6-lite/uninstall.sh index 071cbf3a9..495cf4da3 100755 --- a/Shorewall6-lite/uninstall.sh +++ b/Shorewall6-lite/uninstall.sh @@ -36,6 +36,12 @@ usage() # $1 = exit status exit $1 } +fatal_error() +{ + echo " ERROR: $@" >&2 + exit 1 +} + qt() { "$@" >/dev/null 2>&1 diff --git a/Shorewall6/uninstall.sh b/Shorewall6/uninstall.sh index dc4c25daf..e6b69f123 100755 --- a/Shorewall6/uninstall.sh +++ b/Shorewall6/uninstall.sh @@ -36,6 +36,12 @@ usage() # $1 = exit status exit $1 } +fatal_error() +{ + echo " ERROR: $@" >&2 + exit 1 +} + qt() { "$@" >/dev/null 2>&1