Handle 'PRODUCT' more gracefully

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-03-24 22:21:42 -07:00
parent 877796a7ca
commit 59aab485c3

View File

@ -2280,8 +2280,15 @@ sub process_shorewallrc() {
while ( read_a_line1 ) {
if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) {
my ($var, $val) = ($1, $2);
$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;
} else {
fatal_error "Unrecognized shorewallrc entry";