mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-26 12:42:40 +02:00
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:
parent
9d6f4645ab
commit
873c700dcd
@ -522,15 +522,21 @@ start_command() {
|
|||||||
local finished=0
|
local finished=0
|
||||||
|
|
||||||
do_it() {
|
do_it() {
|
||||||
|
local rc=0
|
||||||
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
[ -n "$nolock" ] || mutex_on
|
||||||
|
|
||||||
progress_message3 "Compiling..."
|
progress_message3 "Compiling..."
|
||||||
|
|
||||||
if $SHOREWALL_SHELL ${SHAREDIR}/compiler $debugging $nolock compile ${VARDIR}/.start; then
|
if $SHOREWALL_SHELL ${SHAREDIR}/compiler $debugging $nolock compile ${VARDIR}/.start; then
|
||||||
${VARDIR}/.start $debugging start
|
${VARDIR}/.start $debugging start
|
||||||
|
rc=$?
|
||||||
|
else
|
||||||
|
rc=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
[ -n "$nolock" ] || mutex_off
|
||||||
|
exit $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
if shorewall_is_started; then
|
if shorewall_is_started; then
|
||||||
@ -774,7 +780,7 @@ check_command() {
|
|||||||
# Restart Command Executor
|
# Restart Command Executor
|
||||||
#
|
#
|
||||||
restart_command() {
|
restart_command() {
|
||||||
local finished=0
|
local finished=0 rc=0
|
||||||
|
|
||||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||||
option=$1
|
option=$1
|
||||||
@ -840,9 +846,13 @@ restart_command() {
|
|||||||
|
|
||||||
if $SHOREWALL_SHELL ${SHAREDIR}/compiler $debugging $nolock compile ${VARDIR}/.restart; then
|
if $SHOREWALL_SHELL ${SHAREDIR}/compiler $debugging $nolock compile ${VARDIR}/.restart; then
|
||||||
$SHOREWALL_SHELL ${VARDIR}/.restart $debugging restart
|
$SHOREWALL_SHELL ${VARDIR}/.restart $debugging restart
|
||||||
|
rc=$?
|
||||||
|
else
|
||||||
|
rc=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
[ -n "$nolock" ] || mutex_off
|
||||||
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user