mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 00:34:04 +01:00
Set PRODUCT before processing rc file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
294babcfbb
commit
5aed14ffdc
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user