forked from extern/shorewall_code
Fix for Tuomo's params issue
This commit is contained in:
parent
bd8dc9d381
commit
68b15c9544
@ -2946,20 +2946,21 @@ sub get_params() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} elsif ( $params[0] =~ /^export (.*?)="/ ) {
|
||||
} elsif ( $params[0] =~ /^export (.*?)="/ || $params[0] =~ /^export ([^\s=]+)\s*$/ ) {
|
||||
#
|
||||
# getparams interpreted by older (e.g., RHEL 5) Bash
|
||||
#
|
||||
# - Variable names preceded by 'export '
|
||||
# - Variable values are delimited by double quotes
|
||||
# - Embedded single quotes are escaped with '\'
|
||||
# - Valueless variables ( e.g., 'export foo') are supported
|
||||
#
|
||||
for ( @params ) {
|
||||
if ( /^export (.*?)="(.*[^\\])"$/ ) {
|
||||
$params{$1} = $2 unless $1 eq '_';
|
||||
} elsif ( /^export (.*?)="(.*)$/ ) {
|
||||
$params{$variable=$1} = $2 eq '"' ? '' : "${2}\n";
|
||||
} elsif ( /^export (.*)\s+$/ || /^export (.*)=""$/ ) {
|
||||
} elsif ( /^export ([^\s=])\s*$/ || /^export (.*)=""$/ ) {
|
||||
$params{$1} = '';
|
||||
} else {
|
||||
if ($variable) {
|
||||
|
Loading…
Reference in New Issue
Block a user