Some minor tweaks

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5754 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-30 03:27:38 +00:00
parent 7b0b1e092c
commit 06e5c030fe

View File

@ -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;
}
#