Restore working 'stop_firewall' for generated script

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3303 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-01-16 21:45:33 +00:00
parent bc27bc935f
commit 109d78c694

View File

@ -8990,6 +8990,45 @@ run_tc() {
fi
}
stop_firewall() {
[ -n "${RESTOREFILE:=restore}" ]
RESTOREPATH=/var/lib/shorewall/$RESTOREFILE
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
done
${RESTOREPATH}-ipsets
fi
echo Restoring Shorewall...
if $RESTOREPATH; then
echo "Shorewall restored from $RESTOREPATH"
set_state "Started"
else
set_state "Unknown"
fi
elif [ -x /sbin/shorewall ]; then
/sbin/shorewall nolock stop
fi
kill $$
exit 2
}
__EOF__
f=$(find_file params)