Expand Shell Variables in shorewall.conf

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5642 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-22 23:57:51 +00:00
parent 8b6f2616d0
commit 81fca7f404

View File

@ -263,6 +263,7 @@ sub get_configuration() {
chomp $line;
next if $line =~ /^\s*#/;
next if $line =~ /^\s*$/;
$line = $1 . ( $ENV{$2} || '' ) . $3 while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/;
if ( $line =~ /^([a-zA-Z]\w*)\s*=\s*(.*)$/ ) {
my ($var, $val) = ($1, $2);