From 57a7bbff8eb41625d8ddc28b9f2c116c8744f530 Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 1 Apr 2007 17:05:57 +0000 Subject: [PATCH] Don't pass TMP_DIR to Perl compiler git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5788 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/lib.config | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/Shorewall/lib.config b/Shorewall/lib.config index 5cad6865f..6e645278d 100644 --- a/Shorewall/lib.config +++ b/Shorewall/lib.config @@ -1817,6 +1817,14 @@ do_initialize() { # PKTTYPE=$(added_param_value_no PKTTYPE $PKTTYPE) + case "${SHOREWALL_COMPILER:=shell}" in + shell|perl) + ;; + *) + startup_error "Invalid value ($SHOREWALL_COMPILER) for SHOREWALL_COMPILER" + ;; + esac + [ -n "${MODULE_SUFFIX:=o gz ko o.gz ko.gz}" ] if [ -z "$EXPORT" -a $(id -u) -eq 0 ]; then @@ -1829,12 +1837,13 @@ do_initialize() { else [ -e "$IPTABLES" ] || startup_error "\$IPTABLES=$IPTABLES does not exist or is not executable" fi - - f=$(find_file capabilities) - [ -f $f ] && . $f || determine_capabilities + if $PROGRAM != compiler || $SHOREWALL_COMPILER = shell ; then + f=$(find_file capabilities) - else + [ -f $f ] && . $f || determine_capabilities + fi + elif $PROGRAM != compiler || $SHOREWALL_COMPILER = shell ; then f=$(find_file capabilities) [ -f $f ] && . $f || startup_error "The -e flag requires a capabilities file" fi @@ -1963,14 +1972,6 @@ do_initialize() { USE_ACTIONS=$(added_param_value_yes USE_ACTIONS $USE_ACTIONS) EXPORTPARAMS=$(added_param_value_yes EXPORTPARAMS $EXPORTPARAMS) - 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" [ -n "$XCONNMARK_MATCH" ] || XCONNMARK= @@ -2081,10 +2082,12 @@ do_initialize() { ;; esac - strip_file zones - strip_file routestopped - strip_file interfaces - strip_file hosts + if [ $PROGRAM != compiler -o $SHOREWALL_COMPILER = shell ]; then + strip_file zones + strip_file routestopped + strip_file interfaces + strip_file hosts + fi if [ $PROGRAM = compiler ]; then if [ $SHOREWALL_COMPILER = 'shell' ]; then @@ -2118,8 +2121,7 @@ do_initialize() { strip_file_and_lib_load tunnels tunnels FW= else - report_capabilities1 > $TMP_DIR/capabilities - export TMP_DIR + rm -rf $TMP_DIR export CONFIG_PATH export VERSION export FW