mirror of
https://gitlab.com/shorewall/code.git
synced 2025-05-03 07:35:22 +02:00
Inline the start_command::do_it() function in lib.cli-std
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d4e05f6163
commit
6c20cc7c4f
@ -513,28 +513,6 @@ start_command() {
|
|||||||
local rc
|
local rc
|
||||||
rc=0
|
rc=0
|
||||||
|
|
||||||
do_it() {
|
|
||||||
if [ -n "$AUTOMAKE" ]; then
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
|
||||||
run_it ${VARDIR}/firewall $g_debugging start
|
|
||||||
rc=$?
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
|
||||||
else
|
|
||||||
g_file="${VARDIR}/.start"
|
|
||||||
if compiler $g_debugging $nolock compile "$g_file"; then
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
|
||||||
run_it ${VARDIR}/.start $g_debugging start
|
|
||||||
rc=$?
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
|
||||||
else
|
|
||||||
rc=$?
|
|
||||||
mylogger kern.err "ERROR:$g_product start failed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit $rc
|
|
||||||
}
|
|
||||||
|
|
||||||
if product_is_started; then
|
if product_is_started; then
|
||||||
error_message "Shorewall is already running"
|
error_message "Shorewall is already running"
|
||||||
exit 0
|
exit 0
|
||||||
@ -626,7 +604,25 @@ start_command() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_it
|
if [ -n "$AUTOMAKE" ]; then
|
||||||
|
[ -n "$nolock" ] || mutex_on
|
||||||
|
run_it ${VARDIR}/firewall $g_debugging start
|
||||||
|
rc=$?
|
||||||
|
[ -n "$nolock" ] || mutex_off
|
||||||
|
else
|
||||||
|
g_file="${VARDIR}/.start"
|
||||||
|
if compiler $g_debugging $nolock compile "$g_file"; then
|
||||||
|
[ -n "$nolock" ] || mutex_on
|
||||||
|
run_it ${VARDIR}/.start $g_debugging start
|
||||||
|
rc=$?
|
||||||
|
[ -n "$nolock" ] || mutex_off
|
||||||
|
else
|
||||||
|
rc=$?
|
||||||
|
mylogger kern.err "ERROR:$g_product start failed"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user