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
This commit is contained in:
teastep 2006-05-11 14:52:00 +00:00
parent 6a3e2b2b06
commit 35f57ce2c7
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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"