mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 03:31:24 +02:00
Acknowledge that restart/refresh/restore are all the same now
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5562 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
3fedb6a7b6
commit
1e2192ab2d
@ -512,19 +512,25 @@ sub generate_script_3() {
|
||||
|
||||
emit_unindented '__EOF__';
|
||||
|
||||
emit_as_is "
|
||||
if [ \$COMMAND = restore ]; then
|
||||
iptables-restore < \$restore_file
|
||||
fi\n";
|
||||
pop_indent;
|
||||
|
||||
emit 'date > ${VARDIR}/restarted';
|
||||
emit "}/n";
|
||||
|
||||
append_file 'start';
|
||||
progress_message2 "Creating iptables-restore input...";
|
||||
create_netfilter_load;
|
||||
|
||||
emit 'set_state "Started"';
|
||||
|
||||
emit '
|
||||
cp -f $(my_pathname) ${VARDIR}/.restore
|
||||
emit "#\n# Start/Restart the Firewall\n#";
|
||||
emit 'define_firewall() {';
|
||||
emit ' setup_routing_and_traffic_shaping;';
|
||||
emit ' setup_netfilter';
|
||||
emit ' restore_dynamic_rules';
|
||||
emit ' date > ${VARDIR}/restarted';
|
||||
emit ' run_start_exit';
|
||||
emit ' run_iptables -N shorewall';
|
||||
emit ' set_state "Started"';
|
||||
emit ' run_started_exit';
|
||||
emit '';
|
||||
emit ' cp -f $(my_pathname) ${VARDIR}/.restore
|
||||
|
||||
case \$COMMAND in
|
||||
start)
|
||||
@ -536,20 +542,8 @@ sub generate_script_3() {
|
||||
restore)
|
||||
logger -p kern.info "$PRODUCT restored"
|
||||
;;
|
||||
esac
|
||||
esac';
|
||||
|
||||
}
|
||||
';
|
||||
|
||||
progress_message2 "Creating iptables-restore input...";
|
||||
create_netfilter_load;
|
||||
emit "#\n# Start/Restart the Firewall\n#";
|
||||
emit 'define_firewall() {';
|
||||
emit ' setup_routing_and_traffic_shaping;';
|
||||
emit ' setup_netfilter';
|
||||
emit ' restore_dynamic_rules';
|
||||
emit ' run_iptables -N shorewall';
|
||||
emit ' run_started_exit';
|
||||
emit "}\n";
|
||||
|
||||
copy find_file 'prog.footer';
|
||||
|
@ -114,7 +114,7 @@ case "$COMMAND" in
|
||||
refresh)
|
||||
if shorewall_is_started; then
|
||||
progress_message3 "Refreshing $PRODUCT...."
|
||||
refresh_firewall
|
||||
define_firewalll
|
||||
status=$?
|
||||
progress_message3 "done."
|
||||
else
|
||||
@ -123,7 +123,7 @@ case "$COMMAND" in
|
||||
fi
|
||||
;;
|
||||
restore)
|
||||
restore_firewall
|
||||
define_firewall
|
||||
status=$?
|
||||
if [ -n "$SUBSYSLOCK" ]; then
|
||||
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
|
||||
|
Loading…
x
Reference in New Issue
Block a user