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:
teastep 2007-06-20 14:31:51 +00:00
parent b97110c258
commit 1ca8ef92c5
2 changed files with 30 additions and 21 deletions

View File

@ -276,6 +276,7 @@ compiler() {
ensure_config_path
compiler=
haveparams=
if [ -n "$SHOREWALL_COMPILER" ]; then
compiler="$SHOREWALL_COMPILER" #Compiler specified in /etc/shorewall/shorewall.conf or on the run-line
@ -293,6 +294,12 @@ compiler() {
#
# Both compilers installed. Read the appropriate shorewall.conf to learn the setting of SHOREWALL_COMPILER
#
if [ -n "$SHOREWALL_DIR" ]; then
[ -x $pc ] && set -a
run_user_exit params
set +a
haveparams=Yes
config=$(find_file shorewall.conf)
if [ -f $config ]; then
@ -305,6 +312,7 @@ compiler() {
else
startup_error "$config does not exist!"
fi
fi
#
# And initiate the appropriate compiler
#
@ -339,9 +347,11 @@ compiler() {
#
# Run the appropriate params file
#
if [ -z "$haveparams" ]; then
set -a;
run_user_exit params
set +a
fi
$command perl $debugflags $pc $options $@
;;
@ -1530,7 +1540,7 @@ COMMAND=$1
case "$COMMAND" in
start)
get_config No Yes
get_config Yes Yes
shift
start_command $@
;;
@ -1542,22 +1552,22 @@ case "$COMMAND" in
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $COMMAND
;;
compile)
get_config
get_config Yes
shift
compile_command $@
;;
restart)
get_config No Yes
get_config Yes Yes
shift
restart_command $@
;;
refresh)
get_config No Yes
get_config Yes Yes
shift
refresh_command $@
;;
check)
get_config
get_config Yes
shift
check_command $@
;;
@ -1572,12 +1582,12 @@ case "$COMMAND" in
show_command $@
;;
load|reload)
get_config
get_config Yes
shift
reload_command $@
;;
export)
get_config
get_config Yes
shift
export_command $@
;;
@ -1624,7 +1634,7 @@ case "$COMMAND" in
version_command $@
;;
try)
get_config
get_config Yes
shift
try_command $@
;;
@ -1801,7 +1811,7 @@ case "$COMMAND" in
usage
;;
safe-restart|safe-start)
get_config
get_config Yes
shift
safe_commands $@
;;

View File

@ -27,7 +27,6 @@ VERBOSITY=1
###############################################################################
# C O M P I L E R
# (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=