diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2024-03-27 09:42:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-27 09:42:37 -0400 |
commit | 92c55f8165219dd28db62ceccf1e27b1c01c055c (patch) | |
tree | 46c08586155fcfbd66fbc87f161195b17b563ec0 /packaging | |
parent | d7391b9f5da764e1a2a6f8356793473b81069d5b (diff) |
Correctly propagate errors from child scripts in kickstart.sh. (#17263)
This fixes a bug introduced by #13802 which would cause errors in
scripts run by the kickstart script to correctly be reported as warnings
by the kickstart script, but not actually cause the script to fail in
cases when it should have.
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/installer/kickstart.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index 6d9f4ea0e7..03cb73428c 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -534,11 +534,15 @@ run_script() { # shellcheck disable=SC2086 run ${ROOTCMD} "${@}" + ret="$?" + if [ -r "${NETDATA_SCRIPT_STATUS_PATH}" ]; then # shellcheck disable=SC1090 . "${NETDATA_SCRIPT_STATUS_PATH}" rm -f "${NETDATA_SCRIPT_STATUS_PATH}" fi + + return "${ret}" } warning() { |