mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
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:
parent
6a3e2b2b06
commit
35f57ce2c7
@ -1515,7 +1515,7 @@ verify_mark() # $1 = value to test
|
|||||||
#
|
#
|
||||||
get_device_mtu() # $1 = device
|
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
|
if [ -n "$output" ]; then
|
||||||
echo $(find_mtu $output)
|
echo $(find_mtu $output)
|
||||||
|
@ -158,12 +158,12 @@ showchain() # $1 = name of chain
|
|||||||
iptablesbug()
|
iptablesbug()
|
||||||
{
|
{
|
||||||
if qt mywhich awk ; then
|
if qt mywhich awk ; then
|
||||||
awk 'BEGIN {sline=""; };\
|
awk 'BEGIN { sline=""; };\
|
||||||
/^-j/ { print sline $0; next };\
|
/^-j/ { print sline $0; next };\
|
||||||
/-m policy.*-j/ { print $0; next };\
|
/-m policy.*-j/ { print $0; next };\
|
||||||
/-m policy/ { sline=$0; next };\
|
/-m policy/ { sline=$0; next };\
|
||||||
/--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\
|
/--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\
|
||||||
{print ; sline="" }'
|
{ print ; sline="" }'
|
||||||
else
|
else
|
||||||
echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2
|
echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2
|
||||||
cat
|
cat
|
||||||
@ -832,7 +832,7 @@ restart_command() {
|
|||||||
progress_message3 "Compiling..."
|
progress_message3 "Compiling..."
|
||||||
|
|
||||||
if $SHOREWALL_SHELL /usr/share/shorewall/compiler $debugging $nolock compile /var/lib/shorewall/.restart; then
|
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
|
fi
|
||||||
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
[ -n "$nolock" ] || mutex_off
|
||||||
@ -1275,11 +1275,11 @@ restore_command() {
|
|||||||
echo Restoring Ipsets...
|
echo Restoring Ipsets...
|
||||||
iptables -F
|
iptables -F
|
||||||
iptables -X
|
iptables -X
|
||||||
${RESTOREPATH}-ipsets
|
$SHOREWALL_SHELL ${RESTOREPATH}-ipsets
|
||||||
fi
|
fi
|
||||||
|
|
||||||
progress_message3 "Restoring Shorewall..."
|
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
|
[ -n "$nolock" ] || mutex_off
|
||||||
else
|
else
|
||||||
echo "File /var/lib/shorewall/$RESTOREFILE: file not found"
|
echo "File /var/lib/shorewall/$RESTOREFILE: file not found"
|
||||||
|
Loading…
Reference in New Issue
Block a user