From eed7bad25a5cfb6d497e26959465fdbc9e8c58af Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 8 Jul 2016 23:54:03 +0100 Subject: [PATCH] re arraigned exitbypass --- lgsm/functions/command_restart.sh | 3 ++- lgsm/functions/core_exit.sh | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index 67a35c449..1753e6ed7 100644 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -8,7 +8,8 @@ local commandnane="RESTART" local commandaction="Restarting" local selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" -exitbypass=1 info_config.sh +exitbypass=1 command_stop.sh +exitbypass=1 command_start.sh \ No newline at end of file diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index 7e0a704aa..ae5e7a62e 100644 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -11,7 +11,9 @@ fn_exit_dev_debug(){ fi } -if [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then +if [ -n "${exitbypass}" ]; then + unset exitbypass +elif [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then if [ "${exitcode}" == "1" ]; then fn_script_log_fatal "${selfname} exiting with code: ${exitcode}" elif [ "${exitcode}" == "2" ]; then @@ -25,8 +27,6 @@ if [ -n "${exitcode}" ]&&[ "${exitcode}" != "0" ]; then # remove trap. trap - INT exit ${exitcode} -elif [ -n "${exitbypass}" ]; then - unset exitbypass else exitcode=0 fn_script_log_pass "${selfname} exiting with code: ${exitcode}"