From 06e5c030fe04a60f82868ba64797c4f26b308da9 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 30 Mar 2007 03:27:38 +0000 Subject: [PATCH] Some minor tweaks git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5754 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Config.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/New/Shorewall/Config.pm b/New/Shorewall/Config.pm index ca6892f79..1e713eb58 100644 --- a/New/Shorewall/Config.pm +++ b/New/Shorewall/Config.pm @@ -282,10 +282,6 @@ my %no_pad = ( COMMENT => 1, sub split_line( $$ ) { my ( $columns, $description ) = @_; - chomp $line; - - $line =~ s/\s+/ /g; - my @line = split /\s+/, $line; return @line if $no_pad{$line[0]}; @@ -344,7 +340,10 @@ sub require_capability( $$ ) { # Some files can have shell variables embedded. This function expands them from %ENV. # sub expand_shell_variables( $ ) { - my $line = $_[0]; $line = $1 . ( $ENV{$2} || '' ) . $3 while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/; $line; + my $line = $_[0]; + $line = $1 . ( $ENV{$2} || '' ) . $3 while $line =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/; + $line = $1 . ( $ENV{$2} || '' ) . $3 while $line =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/; + $line; } #