mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
Allow config options to be used as shell variables
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
10d10b1c16
commit
9d66f34932
@ -1933,9 +1933,11 @@ sub expand_variables( \$ ) {
|
||||
if ( $var =~ /^\d+$/ ) {
|
||||
fatal_error "Undefined parameter (\$$var)" unless $var > 0 && defined $actparms[$var];
|
||||
$val = $actparms[$var];
|
||||
} else {
|
||||
fatal_error "Undefined shell variable (\$$var)" unless exists $params{$var};
|
||||
} elsif ( exists $params{$var} ) {
|
||||
$val = $params{$var};
|
||||
} else {
|
||||
fatal_error "Undefined shell variable (\$$var)" unless exists $config{$var};
|
||||
$val = $config{$var};
|
||||
}
|
||||
|
||||
$val = '' unless defined $val;
|
||||
|
Loading…
Reference in New Issue
Block a user