Don't defer processing of chain/action-specific extension scripts until run-time -- Take 2

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4154 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-06-21 20:53:11 +00:00
parent 1e1802ef13
commit a84441f6ee
2 changed files with 22 additions and 11 deletions

View File

@ -3696,7 +3696,7 @@ process_action_file() # $1 = File Name
local user_exit=$(find_file $1) local user_exit=$(find_file $1)
if [ -f $user_exit ]; then if [ -f $user_exit ]; then
progress_message2 "Processing $user_exit ..." progress_message "Processing $user_exit ..."
. $user_exit . $user_exit
fi fi

View File

@ -15,7 +15,7 @@
</author> </author>
</authorgroup> </authorgroup>
<pubdate>2006-03-24</pubdate> <pubdate>2006-06-21</pubdate>
<copyright> <copyright>
<year>2001-2006</year> <year>2001-2006</year>
@ -238,15 +238,16 @@
<listitem> <listitem>
<para><emphasis role="bold">Shorewall version 3.2.0 and later <para><emphasis role="bold">Shorewall version 3.2.0 and later
only.</emphasis> When compiling your firewall configuration, Shorewall only.</emphasis> When compiling your firewall configuration, Shorewall
copies extension scripts directly into the "compiled" program where they copies most extension scripts directly into the "compiled" program where
are executed in-line during processing of the start, restart and restore they are executed in-line during processing of the start, restart and
commands. When copying a script, Shorewall indents the script to match restore commands. When copying a script, Shorewall indents the script to
the surrounding code; if you have 'awk' installed on the system where match the surrounding code; if you have 'awk' installed on the system
the configuration is being compiled, Shorewall can correctly handle line where the configuration is being compiled, Shorewall can correctly
continuation in your script ("\" as the last character on a line). If handle line continuation in your script ("\" as the last character on a
you do not have awk, you may not use line continuation in your scripts. line). If you do not have awk, you may not use line continuation in your
Also beware that quoted strings continued from one line to another will scripts. Also beware that quoted strings continued from one line to
have extra whitespace inserted as a result of indentation.</para> another will have extra whitespace inserted as a result of
indentation.</para>
<note> <note>
<para>The <filename>/etc/shorewall/params</filename> script is <para>The <filename>/etc/shorewall/params</filename> script is
@ -260,6 +261,16 @@
you use the <command>shorewall compile</command> command to compile a you use the <command>shorewall compile</command> command to compile a
program then run that program at a later time.</para> program then run that program at a later time.</para>
</note> </note>
<note>
<para>Extension scripts associated with a particular chain or action
are not copied into the compiled script; they are rather processed
directly by the compiler using the Bourne shell "." command. For
example, if A is an action then if <filename
class="directory">/etc/shorewall/A</filename> exists then it will be
processed by the compiler rather than copied into the compiled
script.</para>
</note>
</listitem> </listitem>
</itemizedlist> </itemizedlist>