Proper exit status after errors

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4594 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2006-09-27 20:11:52 +00:00
parent 9d6f4645ab
commit 873c700dcd

View File

@ -522,15 +522,21 @@ start_command() {
local finished=0
do_it() {
local rc=0
[ -n "$nolock" ] || mutex_on
progress_message3 "Compiling..."
if $SHOREWALL_SHELL ${SHAREDIR}/compiler $debugging $nolock compile ${VARDIR}/.start; then
${VARDIR}/.start $debugging start
rc=$?
else
rc=$?
fi
[ -n "$nolock" ] || mutex_off
exit $rc
}
if shorewall_is_started; then
@ -774,7 +780,7 @@ check_command() {
# Restart Command Executor
#
restart_command() {
local finished=0
local finished=0 rc=0
while [ $finished -eq 0 -a $# -gt 0 ]; do
option=$1
@ -840,9 +846,13 @@ restart_command() {
if $SHOREWALL_SHELL ${SHAREDIR}/compiler $debugging $nolock compile ${VARDIR}/.restart; then
$SHOREWALL_SHELL ${VARDIR}/.restart $debugging restart
rc=$?
else
rc=$?
fi
[ -n "$nolock" ] || mutex_off
return $rc
}
#