diff --git a/Shorewall-perl/Shorewall/Compiler.pm b/Shorewall-perl/Shorewall/Compiler.pm index 3cc1ad091..710289d19 100644 --- a/Shorewall-perl/Shorewall/Compiler.pm +++ b/Shorewall-perl/Shorewall/Compiler.pm @@ -90,7 +90,7 @@ sub generate_script_1() { copy $globals{SHAREDIRPL} . 'prog.header'; - for my $exit qw/init start tcclear started stop stopped clear refresh/ { + for my $exit qw/init start tcclear started stop stopped clear refresh refreshed/ { emit "run_${exit}_exit() {"; push_indent; append_file $exit or emit 'true'; @@ -533,7 +533,7 @@ sub generate_script_2 () { "fi\n" ); } - emitj ( 'run_init_exit', + emitj ( '[ "$COMMAND" = refresh ] && run_refresh_exit || run_init_exit', '', 'qt $IPTABLES -L shorewall -n && qt $IPTABLES -F shorewall && qt $IPTABLES -X shorewall', '', @@ -630,7 +630,7 @@ if [ $COMMAND = restore ]; then else if [ $COMMAND = refresh ]; then blacklist_reload - run_refresh_exit + run_refreshed_exit $IPTABLES -N shorewall set_state "Started" else diff --git a/docs/shorewall_extension_scripts.xml b/docs/shorewall_extension_scripts.xml index ae09bbab9..ab5a2c09f 100644 --- a/docs/shorewall_extension_scripts.xml +++ b/docs/shorewall_extension_scripts.xml @@ -101,8 +101,11 @@ refresh -- invoked while the firewall is being refreshed but - before the blacklst chains have been rebuilt (Note: Shorewall-perl does - not rebuild the blacklist during refresh). + before the blacklst chains have been rebuilt. + + + + refreshed -- invoked after the firewall has been refreshed. @@ -407,6 +410,18 @@ tcclear + + + + + refresh + + + + + + refreshed + @@ -465,20 +480,11 @@ maclog Note that in the 'initdone' script, there is no default chain ($chainref). You can objtain a reference to a standard chain - by:my $chainref = $chain_table{<table>}{<chain name>};Example:my $chainref = $chain_table{filter}{INPUT};Some - run-time scripts are simply eliminated because they no longer make any - sense under Shorewall-perl: - - continue - This script was designed to allow you to add - special temporary rules during [re]start. Shorewall-perl doesn't - need such rules. - - - - refresh - The refresh command is the same - as restart - - + by:my $chainref = $chain_table{<table>}{<chain name>};Example:my $chainref = $chain_table{filter}{INPUT};The + continue script has been eliminated because it no longer make any sense + under Shorewall-perl. This script was designed to allow you to add + special temporary rules during [re]start. Shorewall-perl doesn't need + such rules. \ No newline at end of file