forked from extern/shorewall_code
Update Extension Script doc for 3.2
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3727 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
abb6316601
commit
c43ee9edc5
@ -15,10 +15,10 @@
|
|||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<pubdate>2005-10-31</pubdate>
|
<pubdate>2006-03-24</pubdate>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2001-2005</year>
|
<year>2001-2006</year>
|
||||||
|
|
||||||
<holder>Thomas M. Eastep</holder>
|
<holder>Thomas M. Eastep</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
@ -178,14 +178,24 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>if you run commands other than <command>iptables</command> that
|
<para>Many of the extension scripts get executed for both the shorewall
|
||||||
must be re-run in order to restore the firewall to its current state
|
start and shorewall restart commands. You can determine which command is
|
||||||
then you must save the commands to the <firstterm>restore
|
being executed using the contents of $COMMAND.</para>
|
||||||
file</firstterm>. The restore file is a temporary file in <filename
|
|
||||||
class="directory">/var/lib/shorewall</filename> that will be renamed
|
<programlisting>if [ $COMMAND = start ]; then
|
||||||
<filename>/var/lib/shorewall/restore-base</filename> at the successful
|
...</programlisting>
|
||||||
completion of the Shorewall command. The <command>shorewall
|
</listitem>
|
||||||
save</command> command combines
|
|
||||||
|
<listitem>
|
||||||
|
<para><emphasis role="bold">Shorewall versions 3.0.x and earlier
|
||||||
|
only.</emphasis> If you run commands other than
|
||||||
|
<command>iptables</command> that must be re-run in order to restore the
|
||||||
|
firewall to its current state then you must save the commands to the
|
||||||
|
<firstterm>restore file</firstterm>. The restore file is a temporary
|
||||||
|
file in <filename class="directory">/var/lib/shorewall</filename> that
|
||||||
|
will be renamed <filename>/var/lib/shorewall/restore-base</filename> at
|
||||||
|
the successful completion of the Shorewall command. The
|
||||||
|
<command>shorewall save</command> command combines
|
||||||
<filename>/var/lib/shorewall/restore-base</filename> with the output of
|
<filename>/var/lib/shorewall/restore-base</filename> with the output of
|
||||||
<command>iptables-save</command> to produce the
|
<command>iptables-save</command> to produce the
|
||||||
<filename>/var/lib/shorewall/restore</filename> script.</para>
|
<filename>/var/lib/shorewall/restore</filename> script.</para>
|
||||||
@ -226,12 +236,17 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Many of the extension scripts get executed for both the shorewall
|
<para><emphasis role="bold">Shorewall version 3.2.0 and later
|
||||||
start and shorewall restart commands. You can determine which command is
|
only.</emphasis> When compiling your firewall configuration, Shorewall
|
||||||
being executed using the contents of $COMMAND.</para>
|
copies extension scripts directly into the "compiled" program where they
|
||||||
|
are executed in-line during processing of the start, restart and restore
|
||||||
<programlisting>if [ $COMMAND = start ]; then
|
commands. When copying a script, Shorewall indents the script to match
|
||||||
...</programlisting>
|
the surrounding code; if you have 'awk' installed on the system where
|
||||||
|
the configuration is being compiled, Shorewall can correctly handle line
|
||||||
|
continuation in your script ("\" as the last character on a line). If
|
||||||
|
you do not have awk, you may not use line continuation in your scripts.
|
||||||
|
Also beware that quoted strings continued from one line to another will
|
||||||
|
have extra whitespace inserted as a result of indentation.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user