mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-24 14:39:04 +01:00
Handle 'PRODUCT' more gracefully
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
877796a7ca
commit
59aab485c3
@ -2280,8 +2280,15 @@ sub process_shorewallrc() {
|
|||||||
while ( read_a_line1 ) {
|
while ( read_a_line1 ) {
|
||||||
if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) {
|
if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) {
|
||||||
my ($var, $val) = ($1, $2);
|
my ($var, $val) = ($1, $2);
|
||||||
|
|
||||||
$val = $1 if $val =~ /^\"([^\"]*)\"$/;
|
$val = $1 if $val =~ /^\"([^\"]*)\"$/;
|
||||||
expand_variables( $val, 1 ) if supplied $val && $var ne 'PRODUCT';
|
|
||||||
|
if ( $var eq 'PRODUCT' ) {
|
||||||
|
$val = $globals{PRODUCT};
|
||||||
|
} elsif ( supplied $val ) {
|
||||||
|
expand_variables($val, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
$shorewallrc{$var} = $val;
|
$shorewallrc{$var} = $val;
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Unrecognized shorewallrc entry";
|
fatal_error "Unrecognized shorewallrc entry";
|
||||||
|
Loading…
Reference in New Issue
Block a user