forked from extern/shorewall_code
Allow variable expansion when processing shorewallrc.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e626b77097
commit
60f2f3b0d0
@ -4075,14 +4075,16 @@ sub process_shorewallrc( $$ ) {
|
||||
my ( $shorewallrc , $product ) = @_;
|
||||
|
||||
$shorewallrc{PRODUCT} = $product;
|
||||
$variables{PRODUCT} = $product;
|
||||
|
||||
if ( open_file $shorewallrc ) {
|
||||
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK ) ) {
|
||||
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK | EXPAND_VARIABLES ) ) {
|
||||
if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) {
|
||||
my ($var, $val) = ($1, $2);
|
||||
$val = $1 if $val =~ /^\"([^\"]*)\"$/;
|
||||
expand_shorewallrc_variables($val) if supplied $val;
|
||||
$shorewallrc{$var} = $val;
|
||||
$variables{$var} = $val;
|
||||
} else {
|
||||
fatal_error "Unrecognized shorewallrc entry";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user