mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 03:59:16 +01:00
Correct handling of nested shell variable expansion; update extension script doc
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6773 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
42e9e8bc45
commit
aa991fcf45
@ -553,8 +553,7 @@ sub read_a_line {
|
|||||||
#
|
#
|
||||||
# Expand Shell Variables using %ENV
|
# Expand Shell Variables using %ENV
|
||||||
#
|
#
|
||||||
$line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/;
|
$line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/ || $line =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/;
|
||||||
$line = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/;
|
|
||||||
|
|
||||||
if ( $line =~ /^\s*INCLUDE\s/ ) {
|
if ( $line =~ /^\s*INCLUDE\s/ ) {
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@
|
|||||||
will abort the compilation.</para>
|
will abort the compilation.</para>
|
||||||
|
|
||||||
<para>All scripts will need to begin with the following
|
<para>All scripts will need to begin with the following
|
||||||
line:<programlisting>use Shorewall::Chains;</programlisting> For more
|
line:<programlisting>use Shorewall::Chains;</programlisting>For more
|
||||||
complex scripts, you may need to 'use' other Shorewall Perl modules --
|
complex scripts, you may need to 'use' other Shorewall Perl modules --
|
||||||
browse <filename
|
browse <filename
|
||||||
class="directory">/usr/share/shorewall-perl/Shorewall/</filename> to see
|
class="directory">/usr/share/shorewall-perl/Shorewall/</filename> to see
|
||||||
@ -479,12 +479,20 @@
|
|||||||
|
|
||||||
<member>maclog</member>
|
<member>maclog</member>
|
||||||
</simplelist>Note that in the 'initdone' script, there is no default
|
</simplelist>Note that in the 'initdone' script, there is no default
|
||||||
chain ($chainref). You can objtain a reference to a standard chain
|
chain ($chainref). You can obtain a reference to a standard chain
|
||||||
by:<programlisting>my $chainref = $chain_table{<table>}{<chain name>};</programlisting>Example:<programlisting>my $chainref = $chain_table{filter}{INPUT};</programlisting>The
|
by:<programlisting>my $chainref = $chain_table{<table>}{<chain name>};</programlisting>Example:<programlisting>my $chainref = $chain_table{filter}{INPUT};</programlisting></para>
|
||||||
continue script has been eliminated because it no longer make any sense
|
|
||||||
under Shorewall-perl. This script was designed to allow you to add
|
<para>You can also use the hash references $filter_table, $mangle_table
|
||||||
special temporary rules during [re]start. Shorewall-perl doesn't need
|
and $nat_table to access chain references.</para>
|
||||||
such rules.</para>
|
|
||||||
|
<para>Example:</para>
|
||||||
|
|
||||||
|
<programlisting>my $chainref = $filter_table->{INPUT}; #Same as above with a few less keystrokes; runs faster too</programlisting>
|
||||||
|
|
||||||
|
<para>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.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</article>
|
</article>
|
Loading…
Reference in New Issue
Block a user