Adjust VARDIR/VARLIB for old shorewallrc files.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-09-09 13:12:32 -07:00
parent 5c62bf297a
commit 0e1e38b035

View File

@ -2645,6 +2645,15 @@ sub process_shorewallrc( $$ ) {
} else {
fatal_error "Failed to open $shorewallrc: $!";
}
if ( supplied $shorewallrc{VARDIR} ) {
if ( ! supplied $shorewallrc{VARLIB} ) {
$shorewallrc{VARLIB} = $shorewallrc{VARDIR};
$shorewallrc{VARDIR} = "$shorewallrc{VARLIB}/$product";
}
} elsif ( supplied $shorewallrc{VARLIB} ) {
$shorewallrc{VARDIR} = "$shorewallrc{VARLIB}/$product" unless supplied $shorewallrc{VARDIR};
}
}
#