@cryptotaxi247 / netdata-1 / commits / 92c55f816

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.

Austin S. Hemmelgarn committed Mar 27, 2024 at 09:42 UTC 92c55f8165219dd28db62ceccf1e27b1c01c055c
1 file changed +4
packaging/installer/kickstart.sh
+4
@@ -534,11 +534,15 @@ run_script() {
534 # shellcheck disable=SC2086
535 run ${ROOTCMD} "${@}"
536
537 + ret="$?"
538 +
539 if [ -r "${NETDATA_SCRIPT_STATUS_PATH}" ]; then
540 # shellcheck disable=SC1090
541 . "${NETDATA_SCRIPT_STATUS_PATH}"
542 rm -f "${NETDATA_SCRIPT_STATUS_PATH}"
543 fi
544 +
545 + return "${ret}"
546 }
547
548 warning() {