diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm
index 02586203f..0aa7cc62b 100644
--- a/Shorewall-perl/Shorewall/Config.pm
+++ b/Shorewall-perl/Shorewall/Config.pm
@@ -551,10 +551,9 @@ sub read_a_line {
#
$line = '', next if $line =~ /^\s*$/;
#
- # 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 = join( '', $1 , ( $ENV{$2} || '' ) , $3 ) while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/ || $line =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/;
if ( $line =~ /^\s*INCLUDE\s/ ) {
diff --git a/docs/shorewall_extension_scripts.xml b/docs/shorewall_extension_scripts.xml
index ab5a2c09f..3b86b390f 100644
--- a/docs/shorewall_extension_scripts.xml
+++ b/docs/shorewall_extension_scripts.xml
@@ -432,7 +432,7 @@
will abort the compilation.
All scripts will need to begin with the following
- line:use Shorewall::Chains; For more
+ line:use Shorewall::Chains;For more
complex scripts, you may need to 'use' other Shorewall Perl modules --
browse /usr/share/shorewall-perl/Shorewall/ to see
@@ -479,12 +479,20 @@
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};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.
+ chain ($chainref). You can obtain a reference to a standard chain
+ by:my $chainref = $chain_table{<table>}{<chain name>};Example:my $chainref = $chain_table{filter}{INPUT};
+
+ You can also use the hash references $filter_table, $mangle_table
+ and $nat_table to access chain references.
+
+ Example:
+
+ my $chainref = $filter_table->{INPUT}; #Same as above with a few less keystrokes; runs faster too
+
+ 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