Add SHOREWALL_COMPILER option to shorewall.conf

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5729 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-28 16:56:09 +00:00
parent 1d21238d67
commit 3e1b163ed1
4 changed files with 15 additions and 8 deletions

View File

@ -5668,13 +5668,13 @@ case "$COMMAND" in
check)
[ $# -ne 1 ] && usage
do_initialize
[ -n "$SHOREWALL_PERL" ] && exec perl $debug /usr/share/shorewall-perl/compiler.pl || compile_firewall
[ "$SHOREWALL_COMPILER" = perl ] && exec perl $debug /usr/share/shorewall-perl/compiler.pl || compile_firewall
;;
compile)
[ $# -ne 2 ] && usage
do_initialize
[ -n "$SHOREWALL_PERL" ] && exec perl $debug /usr/share/shorewall-perl/compiler.pl $2 || compile_firewall $2
[ "$SHOREWALL_COMPILER" = perl ] && exec perl $debug /usr/share/shorewall-perl/compiler.pl $2 || compile_firewall $2
;;
call)

View File

@ -339,7 +339,7 @@ lib_load() # $1 = Name of the Library, $2 = Error Message heading if the library
eval loaded=\$LIB_${1}_LOADED
if [ -z "$loaded" ]; then
if [ -n "$SHOREWALL_PERL" ]; then
if [ "$SHOREWALL_COMPILER" = perl ]; then
eval LIB_${1}_LOADED=Yes
return
fi

View File

@ -1962,7 +1962,14 @@ do_initialize() {
TC_EXPERT=$(added_param_value_no TC_EXPERT $TC_EXPERT)
USE_ACTIONS=$(added_param_value_yes USE_ACTIONS $USE_ACTIONS)
EXPORTPARAMS=$(added_param_value_yes EXPORTPARAMS $EXPORTPARAMS)
SHOREWALL_PERL=$(added_param_value_no SHOREWALL_PERL $SHOREWALL_PERL)
case "${SHOREWALL_COMPILER:=shell}" in
shell|perl)
;;
*)
startup_error "Invalid value ($SHOREWALL_COMPILER) for SHOREWALL_COMPILER"
;;
esac
[ -n "$USE_ACTIONS" ] && lib_load actions "USE_ACTIONS=Yes"
@ -2108,7 +2115,7 @@ do_initialize() {
strip_file_and_lib_load tcrules tcrules
strip_file tos
strip_file_and_lib_load tunnels tunnels
if [ -n "$SHOREWALL_PERL" ]; then
if [ "$SHOREWALL_COMPILER" = perl ]; then
report_capabilities1 > $TMP_DIR/capabilities
export TMP_DIR
export CONFIG_PATH

View File

@ -25,11 +25,11 @@ STARTUP_ENABLED=No
VERBOSITY=1
###############################################################################
# P E R L - B A S E D C O M P I L E R
# (setting this to Yes requires installation of Shorewall-perl)
# C O M P I L E R
# (setting this to 'perl' requires installation of Shorewall-perl)
###############################################################################
SHOREWALL_PERL=No
SHOREWALL_COMPILER=shell
###############################################################################
# L O G G I N G