forked from extern/shorewall_code
Implement SW_CONFDIR support
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
6534201284
commit
03d2088cf7
@ -5925,7 +5925,7 @@ sub get_params( $ ) {
|
||||
#
|
||||
delete $params{$_};
|
||||
} else {
|
||||
unless ( $_ eq 'SHOREWALL_INIT_SCRIPT' || $_ eq 'SW_LOGGERTAG' ) {
|
||||
unless ( $_ eq 'SHOREWALL_INIT_SCRIPT' || $_ eq 'SW_LOGGERTAG' || $_ eq 'SW_CONFDIR' ) {
|
||||
fatal_error "The variable name $_ is reserved and may not be set in the params file"
|
||||
if /^SW_/ || /^SHOREWALL_/ || ( exists $config{$_} && ! exists $ENV{$_} ) || exists $reserved{$_};
|
||||
}
|
||||
|
@ -456,6 +456,16 @@ compiler() {
|
||||
|
||||
ensure_root
|
||||
#
|
||||
# Let params and the compiler know the base configuration directory
|
||||
#
|
||||
if [ -n "$g_shorewalldir" ]; then
|
||||
SW_CONFDIR="$g_shorewalldir"
|
||||
else
|
||||
SW_CONFDIR="$g_confdir"
|
||||
fi
|
||||
|
||||
export SW_CONFDIR
|
||||
#
|
||||
# We've now set g_shorewalldir so recalculate CONFIG_PATH
|
||||
#
|
||||
[ -n "$g_haveconfig" ] || ensure_config_path
|
||||
|
Loading…
Reference in New Issue
Block a user