Apply Mr-4's Shorewall-init bugfix patch

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-05-13 11:23:53 -07:00
parent 200d347ac8
commit 96a5d64941

View File

@ -66,12 +66,11 @@ start () {
echo -n "Initializing \"Shorewall-based firewalls\": " echo -n "Initializing \"Shorewall-based firewalls\": "
retval=0
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
setstatedir setstatedir
retval=$? retval=$?
if [ $retval eq 0 ]; then if [ $retval -eq 0 ]; then
if [ -x "${STATEDIR}/firewall" ]; then if [ -x "${STATEDIR}/firewall" ]; then
${STATEDIR}/firewall stop 2>&1 | $logger ${STATEDIR}/firewall stop 2>&1 | $logger
retval=${PIPESTATUS[0]} retval=${PIPESTATUS[0]}
@ -101,7 +100,6 @@ stop () {
local vardir local vardir
echo -n "Clearing \"Shorewall-based firewalls\": " echo -n "Clearing \"Shorewall-based firewalls\": "
retval=0
for PRODUCT in $PRODUCTS; do for PRODUCT in $PRODUCTS; do
setstatedir setstatedir
@ -152,7 +150,7 @@ case "$1" in
status $prog status $prog
;; ;;
*) *)
echo "Usage: /etc/init.d/shorewall-init {start|stop|status}" echo "Usage: $0 {start|stop|status}"
exit 1 exit 1
esac esac