mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-18 15:46:55 +02:00
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:
parent
bc27bc935f
commit
109d78c694
@ -8990,6 +8990,45 @@ run_tc() {
|
|||||||
fi
|
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__
|
__EOF__
|
||||||
f=$(find_file params)
|
f=$(find_file params)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user