mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-22 21:48:39 +01:00
Fix status checking
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7777 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
2534c13104
commit
5660b6fa1f
@ -103,12 +103,15 @@ startup_error() # $* = Error Message
|
||||
#
|
||||
run_iptables()
|
||||
{
|
||||
local status
|
||||
|
||||
while [ 1 ]; do
|
||||
$IPTABLES $@
|
||||
[ $? -ne 4 ] && break
|
||||
status=$?
|
||||
[ $status -ne 4 ] && break
|
||||
done
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ $status -ne 0 ]; then
|
||||
error_message "ERROR: Command \"$IPTABLES $@\" Failed"
|
||||
stop_firewall
|
||||
exit 2
|
||||
@ -120,9 +123,12 @@ run_iptables()
|
||||
#
|
||||
do_iptables()
|
||||
{
|
||||
local status
|
||||
|
||||
while [ 1 ]; do
|
||||
$IPTABLES $@
|
||||
[ $? -ne 4 ] && break
|
||||
status=$?
|
||||
[ $status -ne 4 ] && return $status;
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -114,10 +114,15 @@ qt()
|
||||
|
||||
qt1()
|
||||
{
|
||||
local status
|
||||
|
||||
while [ 1 ]; do
|
||||
"$@" >/dev/null 2>&1
|
||||
[ $? -ne 4 ] && break;
|
||||
status=$?
|
||||
[ $status -ne 4 ] && break
|
||||
done
|
||||
|
||||
return $status
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user