From 9db140bc5e1c779624db3eb5b2aeecd5f59162c9 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 16 Jan 2006 22:08:17 +0000 Subject: [PATCH] Restore working 'stop_firewall' for generated script -- take 2 git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3304 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index 4292a3613..5b8f98347 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -8992,30 +8992,29 @@ run_tc() { stop_firewall() { - [ -n "${RESTOREFILE:=restore}" ] + [ -n "\${RESTOREFILE:=restore}" ] - RESTOREPATH=/var/lib/shorewall/$RESTOREFILE + RESTOREPATH=/var/lib/shorewall/\$RESTOREFILE - if [ -x $RESTOREPATH ]; then - - if [ -x ${RESTOREPATH}-ipsets ]; then + if [ -x \$RESTOREPATH ]; then + if [ -x \${RESTOREPATH}-ipsets ]; then progress_message2 Restoring Ipsets... # # We must purge iptables to be sure that there are no # references to ipsets # for table in mangle nat filter; do - iptables -t $table -F - iptables -t $table -X + iptables -t \$table -F + iptables -t \$table -X done - ${RESTOREPATH}-ipsets + \${RESTOREPATH}-ipsets fi echo Restoring Shorewall... - if $RESTOREPATH; then - echo "Shorewall restored from $RESTOREPATH" + if \$RESTOREPATH; then + echo "Shorewall restored from \$RESTOREPATH" set_state "Started" else set_state "Unknown" @@ -9024,11 +9023,10 @@ stop_firewall() { /sbin/shorewall nolock stop fi - kill $$ + kill \$\$ exit 2 } - __EOF__ f=$(find_file params)