From 4a4c9a9c6702c7e58129f4cc232f9b35610c47c7 Mon Sep 17 00:00:00 2001 From: teastep Date: Fri, 29 Sep 2006 15:45:03 +0000 Subject: [PATCH] Fix exit status on start/restart commands git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4602 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-lite/shorewall-lite | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Shorewall-lite/shorewall-lite b/Shorewall-lite/shorewall-lite index 0485233e6..1c94ed4a4 100755 --- a/Shorewall-lite/shorewall-lite +++ b/Shorewall-lite/shorewall-lite @@ -481,15 +481,19 @@ start_command() { local finished=0 do_it() { + local rc=0 [ -n "$nolock" ] || mutex_on if [ -x ${LITEDIR}/firewall ]; then ${LITEDIR}/firewall $debugging start + rc=$? else error_message "${LITEDIR}/firewall is missing or is not executable" + rc=2 fi [ -n "$nolock" ] || mutex_off + exit $rc } verify_firewall_script @@ -595,7 +599,7 @@ start_command() { # Restart Command Executor # restart_command() { - local finished=0 + local finished=0 rc=0 verify_firewall_script @@ -656,11 +660,14 @@ restart_command() { if [ -x ${LITEDIR}/firewall ]; then $SHOREWALL_SHELL ${LITEDIR}/firewall $debugging restart + rc=$? else error_message "${LITEDIR}/firewall is missing or is not executable" + rc=2 fi [ -n "$nolock" ] || mutex_off + return $rc } #