mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-22 18:51:24 +02:00
Allow SHOREWALL_COMPILER to be set to a variable from the params file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6616 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b97110c258
commit
1ca8ef92c5
@ -276,6 +276,7 @@ compiler() {
|
|||||||
ensure_config_path
|
ensure_config_path
|
||||||
|
|
||||||
compiler=
|
compiler=
|
||||||
|
haveparams=
|
||||||
|
|
||||||
if [ -n "$SHOREWALL_COMPILER" ]; then
|
if [ -n "$SHOREWALL_COMPILER" ]; then
|
||||||
compiler="$SHOREWALL_COMPILER" #Compiler specified in /etc/shorewall/shorewall.conf or on the run-line
|
compiler="$SHOREWALL_COMPILER" #Compiler specified in /etc/shorewall/shorewall.conf or on the run-line
|
||||||
@ -293,17 +294,24 @@ compiler() {
|
|||||||
#
|
#
|
||||||
# Both compilers installed. Read the appropriate shorewall.conf to learn the setting of SHOREWALL_COMPILER
|
# Both compilers installed. Read the appropriate shorewall.conf to learn the setting of SHOREWALL_COMPILER
|
||||||
#
|
#
|
||||||
config=$(find_file shorewall.conf)
|
if [ -n "$SHOREWALL_DIR" ]; then
|
||||||
|
[ -x $pc ] && set -a
|
||||||
|
run_user_exit params
|
||||||
|
set +a
|
||||||
|
haveparams=Yes
|
||||||
|
|
||||||
if [ -f $config ]; then
|
config=$(find_file shorewall.conf)
|
||||||
if [ -r $config ]; then
|
|
||||||
progress_message "Processing $config..."
|
if [ -f $config ]; then
|
||||||
. $config
|
if [ -r $config ]; then
|
||||||
|
progress_message "Processing $config..."
|
||||||
|
. $config
|
||||||
|
else
|
||||||
|
startup_error "Cannot read $config (Hint: Are you root?)"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
startup_error "Cannot read $config (Hint: Are you root?)"
|
startup_error "$config does not exist!"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
startup_error "$config does not exist!"
|
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
# And initiate the appropriate compiler
|
# And initiate the appropriate compiler
|
||||||
@ -339,9 +347,11 @@ compiler() {
|
|||||||
#
|
#
|
||||||
# Run the appropriate params file
|
# Run the appropriate params file
|
||||||
#
|
#
|
||||||
set -a;
|
if [ -z "$haveparams" ]; then
|
||||||
run_user_exit params
|
set -a;
|
||||||
set +a
|
run_user_exit params
|
||||||
|
set +a
|
||||||
|
fi
|
||||||
|
|
||||||
$command perl $debugflags $pc $options $@
|
$command perl $debugflags $pc $options $@
|
||||||
;;
|
;;
|
||||||
@ -1530,7 +1540,7 @@ COMMAND=$1
|
|||||||
|
|
||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
start)
|
start)
|
||||||
get_config No Yes
|
get_config Yes Yes
|
||||||
shift
|
shift
|
||||||
start_command $@
|
start_command $@
|
||||||
;;
|
;;
|
||||||
@ -1542,22 +1552,22 @@ case "$COMMAND" in
|
|||||||
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $COMMAND
|
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $COMMAND
|
||||||
;;
|
;;
|
||||||
compile)
|
compile)
|
||||||
get_config
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
compile_command $@
|
compile_command $@
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
get_config No Yes
|
get_config Yes Yes
|
||||||
shift
|
shift
|
||||||
restart_command $@
|
restart_command $@
|
||||||
;;
|
;;
|
||||||
refresh)
|
refresh)
|
||||||
get_config No Yes
|
get_config Yes Yes
|
||||||
shift
|
shift
|
||||||
refresh_command $@
|
refresh_command $@
|
||||||
;;
|
;;
|
||||||
check)
|
check)
|
||||||
get_config
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
check_command $@
|
check_command $@
|
||||||
;;
|
;;
|
||||||
@ -1572,12 +1582,12 @@ case "$COMMAND" in
|
|||||||
show_command $@
|
show_command $@
|
||||||
;;
|
;;
|
||||||
load|reload)
|
load|reload)
|
||||||
get_config
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
reload_command $@
|
reload_command $@
|
||||||
;;
|
;;
|
||||||
export)
|
export)
|
||||||
get_config
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
export_command $@
|
export_command $@
|
||||||
;;
|
;;
|
||||||
@ -1624,7 +1634,7 @@ case "$COMMAND" in
|
|||||||
version_command $@
|
version_command $@
|
||||||
;;
|
;;
|
||||||
try)
|
try)
|
||||||
get_config
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
try_command $@
|
try_command $@
|
||||||
;;
|
;;
|
||||||
@ -1801,7 +1811,7 @@ case "$COMMAND" in
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
safe-restart|safe-start)
|
safe-restart|safe-start)
|
||||||
get_config
|
get_config Yes
|
||||||
shift
|
shift
|
||||||
safe_commands $@
|
safe_commands $@
|
||||||
;;
|
;;
|
||||||
|
@ -27,7 +27,6 @@ VERBOSITY=1
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# C O M P I L E R
|
# C O M P I L E R
|
||||||
# (setting this to 'perl' requires installation of Shorewall-perl)
|
# (setting this to 'perl' requires installation of Shorewall-perl)
|
||||||
# May not be set to the value of a variable from /etc/shorewall/params
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
SHOREWALL_COMPILER=
|
SHOREWALL_COMPILER=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user