From 62c9cb7b362fd36ea7bf9679692e2eeca9a86595 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 7 Apr 2010 13:16:16 -0700 Subject: [PATCH] Change 'first_install' tests Signed-off-by: Tom Eastep --- Shorewall-lite/install.sh | 11 +++++++++-- Shorewall/install.sh | 4 ++-- Shorewall6-lite/install.sh | 8 ++++++-- Shorewall6/install.sh | 4 ++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 4e6a13f0a..8b354b822 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -180,16 +180,23 @@ echo "Installing Shorewall Lite Version $VERSION" # Check for /etc/shorewall-lite # if [ -z "$PREFIX" -a -d /etc/shorewall-lite ]; then - first_install="" [ -f /etc/shorewall-lite/shorewall.conf ] && \ mv -f /etc/shorewall-lite/shorewall.conf /etc/shorewall-lite/shorewall-lite.conf else - first_install="Yes" rm -rf ${PREFIX}/etc/shorewall-lite rm -rf ${PREFIX}/usr/share/shorewall-lite rm -rf ${PREFIX}/var/lib/shorewall-lite fi +# +# Check for /sbin/shorewall-lite +# +if [ -f ${PREFIX}/sbin/shorewall-lite ]; then + first_install="" +else + first_install="Yes" +fi + delete_file ${PREFIX}/usr/share/shorewall-lite/xmodules install_file shorewall-lite ${PREFIX}/sbin/shorewall-lite 0544 ${PREFIX}/var/lib/shorewall-lite-${VERSION}.bkout diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 080351d83..d7a248af9 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -209,9 +209,9 @@ cd "$(dirname $0)" echo "Installing Shorewall Version $VERSION" # -# Check for /etc/shorewall +# Check for /sbin/shorewall # -if [ -d ${PREFIX}/etc/shorewall ]; then +if [ -f ${PREFIX}/sbin/shorewall ]; then first_install="" else first_install="Yes" diff --git a/Shorewall6-lite/install.sh b/Shorewall6-lite/install.sh index 57a5df422..763513586 100755 --- a/Shorewall6-lite/install.sh +++ b/Shorewall6-lite/install.sh @@ -179,16 +179,20 @@ echo "Installing Shorewall6 Lite Version $VERSION" # Check for /etc/shorewall6-lite # if [ -z "$PREFIX" -a -d /etc/shorewall6-lite ]; then - first_install="" [ -f /etc/shorewall6-lite/shorewall.conf ] && \ mv -f /etc/shorewall6-lite/shorewall.conf /etc/shorewall6-lite/shorewall6-lite.conf else - first_install="Yes" rm -rf ${PREFIX}/etc/shorewall6-lite rm -rf ${PREFIX}/usr/share/shorewall6-lite rm -rf ${PREFIX}/var/lib/shorewall6-lite fi +if [ -f ${PREFIX}/sbin/shorewall6-lite ]; then + first_install="" +else + first_install="Yes" +fi + delete_file ${PREFIX}/usr/share/shorewall6-lite/xmodules install_file shorewall6-lite ${PREFIX}/sbin/shorewall6-lite 0544 ${PREFIX}/var/lib/shorewall6-lite-${VERSION}.bkout diff --git a/Shorewall6/install.sh b/Shorewall6/install.sh index cfd16f9d5..c199f36ea 100755 --- a/Shorewall6/install.sh +++ b/Shorewall6/install.sh @@ -202,9 +202,9 @@ cd "$(dirname $0)" echo "Installing Shorewall6 Version $VERSION" # -# Check for /etc/shorewall6 +# Check for /sbin/shorewall6 # -if [ -d ${PREFIX}/etc/shorewall6 ]; then +if [ -f ${PREFIX}/sbin/shorewall6 ]; then first_install="" else first_install="Yes"