diff --git a/Shorewall-lite/install.sh b/Shorewall-lite/install.sh index 879b6dfd1..38f89ed51 100755 --- a/Shorewall-lite/install.sh +++ b/Shorewall-lite/install.sh @@ -22,7 +22,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA # -VERSION=3.4.1 +VERSION=3.4.2 usage() # $1 = exit status { @@ -332,10 +332,10 @@ echo "Modules file installed as ${PREFIX}/usr/share/shorewall-lite/modules" # Install the Man Pages # -rm -f *.gz - cd manpages +rm -f *.gz + for f in *.5; do gzip $f run_install -D -m 444 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz diff --git a/Shorewall/install.sh b/Shorewall/install.sh index 2aeddc5dc..6b7f827ce 100755 --- a/Shorewall/install.sh +++ b/Shorewall/install.sh @@ -677,10 +677,10 @@ fi # Install the Man Pages # -rm -f *.gz - cd manpages +rm -f *.gz + for f in *.5; do gzip $f run_install -D -m 0444 $f.gz ${PREFIX}/usr/share/man/man5/$f.gz diff --git a/Shorewall/lib.config b/Shorewall/lib.config index 7b5edc1ae..a8bd77bb0 100644 --- a/Shorewall/lib.config +++ b/Shorewall/lib.config @@ -1767,19 +1767,6 @@ do_initialize() { VERSION_FILE= LOGRULENUMBERS= ORIGINAL_POLICY_MATCH= - TMP_DIR=$(mktempdir) - - [ -n "$TMP_DIR" ] && chmod 700 $TMP_DIR || \ - startup_error "Can't create a temporary directory" - - case $PROGRAM in - compiler) - trap "[ -n "$OUTPUT" ] && rm -f $OUTPUT;rm -rf $TMP_DIR; exit 2" 1 2 3 4 5 6 9 - ;; - firewall) - trap "[ -n "$RESTOREBASE" ] && rm -f $RESTOREBASE;rm -rf $TMP_DIR; my_mutex_off; exit 2" 1 2 3 4 5 6 9 - ;; - esac ensure_config_path @@ -1791,7 +1778,7 @@ do_initialize() { run_user_exit params - [ -d /usr/share/shorewall-perl ] && set +a + set +a config=$(find_file shorewall.conf) @@ -1818,13 +1805,31 @@ do_initialize() { PKTTYPE=$(added_param_value_no PKTTYPE $PKTTYPE) case "${SHOREWALL_COMPILER:=shell}" in - shell|perl) + perl) + export CONFIG_PATH; + return; + ;; + shell) ;; *) startup_error "Invalid value ($SHOREWALL_COMPILER) for SHOREWALL_COMPILER" ;; esac + TMP_DIR=$(mktempdir) + + [ -n "$TMP_DIR" ] && chmod 700 $TMP_DIR || \ + startup_error "Can't create a temporary directory" + + case $PROGRAM in + compiler) + trap "[ -n "$OUTPUT" ] && rm -f $OUTPUT;rm -rf $TMP_DIR; exit 2" 1 2 3 4 5 6 9 + ;; + firewall) + trap "[ -n "$RESTOREBASE" ] && rm -f $RESTOREBASE;rm -rf $TMP_DIR; my_mutex_off; exit 2" 1 2 3 4 5 6 9 + ;; + esac + [ -n "${MODULE_SUFFIX:=o gz ko o.gz ko.gz}" ] if [ -z "$EXPORT" -a $(id -u) -eq 0 ]; then @@ -1841,7 +1846,7 @@ do_initialize() { f=$(find_file capabilities) [ -f $f ] && . $f || determine_capabilities - elif [ $PROGRAM != compiler -o $SHOREWALL_COMPILER = shell ] ; then + else f=$(find_file capabilities) [ -f $f ] && . $f || startup_error "The -e flag requires a capabilities file" fi @@ -2080,7 +2085,7 @@ do_initialize() { ;; esac - if [ $PROGRAM != compiler -o $SHOREWALL_COMPILER = shell ]; then + if [ $PROGRAM != compiler ]; then strip_file zones strip_file routestopped strip_file interfaces @@ -2088,41 +2093,34 @@ do_initialize() { fi if [ $PROGRAM = compiler ]; then - if [ $SHOREWALL_COMPILER = 'shell' ]; then - strip_file_and_lib_load accounting accounting + strip_file_and_lib_load accounting accounting - if [ -n "$USE_ACTIONS" ]; then - strip_file actions - strip_file actions.std ${SHAREDIR}/actions.std - fi - - strip_file blacklist - strip_file ecn - strip_file maclist - strip_file_and_lib_load masq nat - strip_file_and_lib_load nat nat - strip_file_and_lib_load netmap nat - strip_file policy - strip_file_and_lib_load providers providers && strip_file route_rules - strip_file_and_lib_load proxyarp proxyarp - strip_file rfc1918 - strip_file routestopped - strip_file rules - - if [ "$TC_ENABLED" = Internal ]; then - strip_file_and_lib_load tcdevices tc - strip_file_and_lib_load tcclasses tc - fi - - strip_file_and_lib_load tcrules tcrules - strip_file tos - strip_file_and_lib_load tunnels tunnels - FW= - else - rm -rf $TMP_DIR - export CONFIG_PATH - export VERSION - export FW + if [ -n "$USE_ACTIONS" ]; then + strip_file actions + strip_file actions.std ${SHAREDIR}/actions.std fi + + strip_file blacklist + strip_file ecn + strip_file maclist + strip_file_and_lib_load masq nat + strip_file_and_lib_load nat nat + strip_file_and_lib_load netmap nat + strip_file policy + strip_file_and_lib_load providers providers && strip_file route_rules + strip_file_and_lib_load proxyarp proxyarp + strip_file rfc1918 + strip_file routestopped + strip_file rules + + if [ "$TC_ENABLED" = Internal ]; then + strip_file_and_lib_load tcdevices tc + strip_file_and_lib_load tcclasses tc + fi + + strip_file_and_lib_load tcrules tcrules + strip_file tos + strip_file_and_lib_load tunnels tunnels + FW= fi }