From 35f57ce2c769014db79e37b3167cddba77e66ab3 Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 11 May 2006 14:52:00 +0000 Subject: [PATCH] Allow compiled script to run under /bin/ash; use SHOREWALL_SHELL as appropriate git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3903 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/functions | 2 +- Shorewall/shorewall | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Shorewall/functions b/Shorewall/functions index 9cee4cf96..21e2a7372 100644 --- a/Shorewall/functions +++ b/Shorewall/functions @@ -1515,7 +1515,7 @@ verify_mark() # $1 = value to test # get_device_mtu() # $1 = device { - local output=$(ip link ls dev $1 2> /dev/null) + local output="$(ip link ls dev $1 2> /dev/null)" # quotes required for /bin/ash if [ -n "$output" ]; then echo $(find_mtu $output) diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 083018c63..42c90f6f5 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -158,12 +158,12 @@ showchain() # $1 = name of chain iptablesbug() { if qt mywhich awk ; then - awk 'BEGIN {sline=""; };\ + awk 'BEGIN { sline=""; };\ /^-j/ { print sline $0; next };\ /-m policy.*-j/ { print $0; next };\ /-m policy/ { sline=$0; next };\ /--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\ - {print ; sline="" }' + { print ; sline="" }' else echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2 cat @@ -832,7 +832,7 @@ restart_command() { progress_message3 "Compiling..." if $SHOREWALL_SHELL /usr/share/shorewall/compiler $debugging $nolock compile /var/lib/shorewall/.restart; then - /var/lib/shorewall/.restart restart + $SHOREWALL_SHELL /var/lib/shorewall/.restart restart fi [ -n "$nolock" ] || mutex_off @@ -1275,11 +1275,11 @@ restore_command() { echo Restoring Ipsets... iptables -F iptables -X - ${RESTOREPATH}-ipsets + $SHOREWALL_SHELL ${RESTOREPATH}-ipsets fi progress_message3 "Restoring Shorewall..." - $RESTOREPATH restore && progress_message3 "Shorewall restored from /var/lib/shorewall/$RESTOREFILE" + $SHOREWALL_SHELL $RESTOREPATH restore && progress_message3 "Shorewall restored from /var/lib/shorewall/$RESTOREFILE" [ -n "$nolock" ] || mutex_off else echo "File /var/lib/shorewall/$RESTOREFILE: file not found"