mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 11:20:53 +01:00
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:
parent
7b0b1e092c
commit
06e5c030fe
@ -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;
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user