mirror of
https://gitlab.com/shorewall/code.git
synced 2025-08-16 19:56:48 +02:00
Don't modify CONFDIR and SHAREDIR in the shell code
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
@ -31,7 +31,6 @@
|
||||
#
|
||||
get_config() {
|
||||
local prog
|
||||
local confdir
|
||||
|
||||
ensure_config_path
|
||||
|
||||
@ -49,10 +48,7 @@ get_config() {
|
||||
|
||||
if [ -f $config ]; then
|
||||
if [ -r $config ]; then
|
||||
confdir=${CONFDIR}
|
||||
CONFDIR=${g_confdir}
|
||||
. $config
|
||||
CONFDIR=${confdir}
|
||||
else
|
||||
echo "Cannot read $config! (Hint: Are you root?)" >&2
|
||||
exit 1
|
||||
@ -382,7 +378,7 @@ compiler() {
|
||||
#
|
||||
# Get the config from $g_shorewalldir
|
||||
#
|
||||
[ -n "$g_shorewalldir" -a "$g_shorewalldir" != /etc/$g_program ] && get_config
|
||||
[ -n "$g_shorewalldir" -a "$g_shorewalldir" != ${g_confdir} ] && get_config
|
||||
|
||||
case $COMMAND in
|
||||
*start|try|refresh)
|
||||
@ -407,7 +403,7 @@ compiler() {
|
||||
shorewallrc=$(find_file shorewallrc)
|
||||
[ -f "$shorewallrc" ] || fatal_error "Compiling for export requires a shorewallrc file"
|
||||
else
|
||||
shorewallrc="${g_sharedir}/shorewall/shorewallrc"
|
||||
shorewallrc="${g_basedir}/shorewallrc"
|
||||
fi
|
||||
|
||||
options="--verbose=$VERBOSITY --family=$g_family --config_path=$CONFIG_PATH --shorewallrc=${shorewallrc}"
|
||||
|
Reference in New Issue
Block a user