From 5aed14ffdc3ad3844ad0be2f5998949630a0fc41 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 25 Mar 2012 07:25:15 -0700 Subject: [PATCH] Set PRODUCT before processing rc file. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Config.pm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 84b9fb8fa..1485c4b6c 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -2276,19 +2276,14 @@ sub read_a_line1() { sub process_shorewallrc() { my $home = $ENV{HOME} || `echo ~`; + $shorewallrc{PRODUCT} = $family == F_IPV4 ? 'shorewall' : 'shorewall6'; + if ( $home && open_file "$home/.shorewallrc" ) { while ( read_a_line1 ) { if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) { my ($var, $val) = ($1, $2); - $val = $1 if $val =~ /^\"([^\"]*)\"$/; - - if ( $var eq 'PRODUCT' ) { - $val = $globals{PRODUCT}; - } elsif ( supplied $val ) { - expand_variables($val, 1 ); - } - + expand_variables($val, 1 ) if supplied $val; $shorewallrc{$var} = $val; } else { fatal_error "Unrecognized shorewallrc entry";