diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 8edba2f6a..bc8ac7657 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -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}; + } } #