More RTC changes

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9336 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2009-01-24 23:57:10 +00:00
parent 0d87cecbad
commit 88c57231ac
3 changed files with 110 additions and 90 deletions

View File

@ -318,6 +318,7 @@ EOF
;;
esac
if [ -z "$RTCONLY" ]; then
if [ "$RESTOREFILE" = NONE ]; then
COMMAND=clear
clear_firewall
@ -357,6 +358,7 @@ EOF
exit 2
fi
fi
fi
;;
esac
@ -365,7 +367,18 @@ EOF
STOPPING="Yes"
TERMINATOR=
EOF
emit ' if [ -n "$RTCONLY" ]; then';
push_indent;
emit( ' delete_tc1' ) if $config{CLEAR_TC};
emit( ' undo_routing',
' restore_default_route'
);
pop_indent;
emit <<'EOF';
else
deletechain shorewall
run_stop_exit
@ -425,6 +438,7 @@ EOF
EOF
}
push_indent;
push_indent;
emit 'delete_tc1' if $config{CLEAR_TC};
@ -578,12 +592,14 @@ EOF
}
}
emit 'run_stopped_exit';
emit( '',
'run_stopped_exit' ,
'set_state "Stopped"' );
pop_indent;
pop_indent;
emit '
set_state "Stopped"
emit ' fi
logger -p kern.info "$PRODUCT Stopped"

View File

@ -20,6 +20,7 @@ delete_proxyarp() {
clear_firewall() {
stop_firewall
if [ -z "$RTCONLY" ]; then
setpolicy INPUT ACCEPT
setpolicy FORWARD ACCEPT
setpolicy OUTPUT ACCEPT
@ -39,6 +40,7 @@ clear_firewall() {
run_clear_exit
set_state "Cleared"
fi
logger -p kern.info "$PRODUCT Cleared"
}

View File

@ -4,6 +4,7 @@
clear_firewall() {
stop_firewall
if [ -z "$RTCONLY" ]; then
setpolicy INPUT ACCEPT
setpolicy FORWARD ACCEPT
setpolicy OUTPUT ACCEPT
@ -15,6 +16,7 @@ clear_firewall() {
run_clear_exit
set_state "Cleared"
fi
logger -p kern.info "$PRODUCT Cleared"
}