mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 11:41:26 +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_unindented '__EOF__';
|
||||||
|
|
||||||
emit_as_is "
|
pop_indent;
|
||||||
if [ \$COMMAND = restore ]; then
|
|
||||||
iptables-restore < \$restore_file
|
|
||||||
fi\n";
|
|
||||||
|
|
||||||
emit 'date > ${VARDIR}/restarted';
|
emit "}/n";
|
||||||
|
|
||||||
append_file 'start';
|
progress_message2 "Creating iptables-restore input...";
|
||||||
|
create_netfilter_load;
|
||||||
|
|
||||||
emit 'set_state "Started"';
|
emit "#\n# Start/Restart the Firewall\n#";
|
||||||
|
emit 'define_firewall() {';
|
||||||
emit '
|
emit ' setup_routing_and_traffic_shaping;';
|
||||||
cp -f $(my_pathname) ${VARDIR}/.restore
|
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
|
case \$COMMAND in
|
||||||
start)
|
start)
|
||||||
@ -536,20 +542,8 @@ sub generate_script_3() {
|
|||||||
restore)
|
restore)
|
||||||
logger -p kern.info "$PRODUCT restored"
|
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";
|
emit "}\n";
|
||||||
|
|
||||||
copy find_file 'prog.footer';
|
copy find_file 'prog.footer';
|
||||||
|
@ -114,7 +114,7 @@ case "$COMMAND" in
|
|||||||
refresh)
|
refresh)
|
||||||
if shorewall_is_started; then
|
if shorewall_is_started; then
|
||||||
progress_message3 "Refreshing $PRODUCT...."
|
progress_message3 "Refreshing $PRODUCT...."
|
||||||
refresh_firewall
|
define_firewalll
|
||||||
status=$?
|
status=$?
|
||||||
progress_message3 "done."
|
progress_message3 "done."
|
||||||
else
|
else
|
||||||
@ -123,7 +123,7 @@ case "$COMMAND" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
restore)
|
restore)
|
||||||
restore_firewall
|
define_firewall
|
||||||
status=$?
|
status=$?
|
||||||
if [ -n "$SUBSYSLOCK" ]; then
|
if [ -n "$SUBSYSLOCK" ]; then
|
||||||
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
|
[ $status -eq 0 ] && touch $SUBSYSLOCK || rm -f $SUBSYSLOCK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user