From 156fa5ab01179005f7662941cfe61b8e7afa0c60 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 1 Sep 2012 10:52:59 -0700 Subject: [PATCH] Some fixes to the Fedora Shorewall-init init script Signed-off-by: Tom Eastep --- Shorewall-init/init.fedora.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Shorewall-init/init.fedora.sh b/Shorewall-init/init.fedora.sh index 6488a423e..a2ee32d23 100755 --- a/Shorewall-init/init.fedora.sh +++ b/Shorewall-init/init.fedora.sh @@ -14,13 +14,8 @@ # prior to bringing up the network. ### END INIT INFO #determine where the files were installed -if [ -f ~/.shorewallrc ]; then - . ~/.shorewallrc || exit 1 -else - SBINDIR=/sbin - SYSCONFDIR=/etc/default - VARDIR=/var/lib -fi + +. /usr/share/shorewall/shorewallrc prog="shorewall-init" logger="logger -i -t $prog" @@ -56,7 +51,7 @@ start () { if [ -x ${VARDIR}/$product/firewall ]; then ${VARDIR}/$product/firewall stop 2>&1 | $logger retval=${PIPESTATUS[0]} - [ retval -ne 0 ] && break + [ $retval -ne 0 ] && break fi done @@ -80,7 +75,7 @@ stop () { if [ -x ${VARDIR}/$product/firewall ]; then ${VARDIR}/$product/firewall clear 2>&1 | $logger retval=${PIPESTATUS[0]} - [ retval -ne 0 ] && break + [ $retval -ne 0 ] && break fi done @@ -119,7 +114,7 @@ case "$1" in status $prog ;; *) - echo "Usage: /etc/init.d/shorewall-init {start|stop}" + echo "Usage: /etc/init.d/shorewall-init {start|stop|status}" exit 1 esac