From 1605f6d9bdc62427dc7e8a5ab2ac5355a905c09a Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 9 Jun 2006 15:42:51 +0000 Subject: [PATCH] A couple of tweaks to /sbin/shorewall git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4032 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-lite/shorewall | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/Shorewall-lite/shorewall b/Shorewall-lite/shorewall index b898d1e3a..e8289bdb6 100755 --- a/Shorewall-lite/shorewall +++ b/Shorewall-lite/shorewall @@ -131,12 +131,12 @@ showchain() # $1 = name of chain iptablesbug() { if qt mywhich awk ; then - awk 'BEGIN {sline=""; };\ + awk 'BEGIN { sline=""; };\ /^-j/ { print sline $0; next };\ /-m policy.*-j/ { print $0; next };\ /-m policy/ { sline=$0; next };\ /--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\ - {print ; sline="" }' + { print ; sline="" }' else echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2 cat @@ -553,7 +553,7 @@ start_command() { # iptables -F iptables -X - ${RESTOREPATH}-ipsets + $SHOREWALL_SHELL ${RESTOREPATH}-ipsets fi echo Restoring Shorewall... @@ -933,11 +933,11 @@ restore_command() { echo Restoring Ipsets... iptables -F iptables -X - ${RESTOREPATH}-ipsets + $SHOREWALL_SHELL ${RESTOREPATH}-ipsets fi progress_message3 "Restoring Shorewall..." - $RESTOREPATH restore && echo "Shorewall restored from /var/lib/shorewall/$RESTOREFILE" + $SHOREWALL_SHELL $RESTOREPATH restore && echo "Shorewall restored from /var/lib/shorewall/$RESTOREFILE" [ -n "$nolock" ] || mutex_off else echo "File /var/lib/shorewall/$RESTOREFILE: file not found" @@ -1249,9 +1249,7 @@ COMMAND=$1 case "$COMMAND" in start) shift - start_command $@ - ;; stop|reset|clear|refresh) [ $# -ne 1 ] && usage 1 @@ -1260,21 +1258,15 @@ case "$COMMAND" in ;; restart) shift - restart_command $@ - ;; check) shift - check_command $@ - ;; show|list) shift - show_command $@ - ;; status) [ $# -eq 1 ] || usage 1 @@ -1304,9 +1296,7 @@ case "$COMMAND" in ;; dump) shift - dump_command $@ - ;; hits) [ -n "$debugging" ] && set -x @@ -1593,9 +1583,7 @@ case "$COMMAND" in ;; restore) shift - restore_command $@ - ;; call) [ -n "$debugging" ] && set -x