summaryrefslogtreecommitdiffstats
path: root/packaging/installer/netdata-updater.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:00 +0000
commit03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch)
treee16b06711a2ed77cafb4b7754be0220c3d14a9d7 /packaging/installer/netdata-updater.sh
parentAdding upstream version 1.36.1. (diff)
downloadnetdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.tar.xz
netdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.zip
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/installer/netdata-updater.sh')
-rwxr-xr-xpackaging/installer/netdata-updater.sh25
1 files changed, 19 insertions, 6 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh
index 15b7deda..d018d67d 100755
--- a/packaging/installer/netdata-updater.sh
+++ b/packaging/installer/netdata-updater.sh
@@ -85,9 +85,17 @@ exit_reason() {
EXIT_REASON="${1}"
EXIT_CODE="${2}"
if [ -n "${NETDATA_PROPAGATE_WARNINGS}" ]; then
- export EXIT_REASON
- export EXIT_CODE
- export NETDATA_WARNINGS
+ if [ -n "${NETDATA_SCRIPT_STATUS_PATH}" ]; then
+ {
+ echo "EXIT_REASON=\"${EXIT_REASON}\""
+ echo "EXIT_CODE=\"${EXIT_CODE}\""
+ echo "NETDATA_WARNINGS=\"${NETDATA_WARNINGS}\""
+ } >> "${NETDATA_SCRIPT_STATUS_PATH}"
+ else
+ export EXIT_REASON
+ export EXIT_CODE
+ export NETDATA_WARNINGS
+ fi
fi
fi
}
@@ -602,15 +610,20 @@ update_build() {
export NETDATA_SAVE_WARNINGS=1
export NETDATA_PROPAGATE_WARNINGS=1
export NETDATA_WARNINGS="${NETDATA_WARNINGS}"
+ export NETDATA_SCRIPT_STATUS_PATH="${NETDATA_SCRIPT_STATUS_PATH}"
# shellcheck disable=SC2086
if ! ${env} ./netdata-installer.sh ${REINSTALL_OPTIONS} --dont-wait ${do_not_start} >&3 2>&3; then
+ if [ -r "${NETDATA_SCRIPT_STATUS_PATH}" ]; then
+ # shellcheck disable=SC1090
+ . "${NETDATA_SCRIPT_STATUS_PATH}"
+ rm -f "${NETDATA_SCRIPT_STATUS_PATH}"
+ fi
if [ -n "${EXIT_REASON}" ]; then
fatal "Failed to rebuild existing netdata install: ${EXIT_REASON}" "U${EXIT_CODE}"
else
fatal "Failed to rebuild existing netdata reinstall." UI0000
fi
fi
- eval "${env} ./netdata-installer.sh ${REINSTALL_OPTIONS} --dont-wait ${do_not_start}" >&3 2>&3 || fatal "FAILED TO COMPILE/INSTALL NETDATA" U0009
# We no longer store checksum info here. but leave this so that we clean up all environment files upon next update.
sed -i '/NETDATA_TARBALL/d' "${ENVIRONMENT_FILE}"
@@ -650,7 +663,7 @@ update_static() {
# Do not pass any options other than the accept, for now
# shellcheck disable=SC2086
- if sh "${ndtmpdir}/netdata-${sysarch}-latest.gz.run" --accept -- ${REINSTALL_OPTIONS}; then
+ if sh "${ndtmpdir}/netdata-${sysarch}-latest.gz.run" --accept -- ${REINSTALL_OPTIONS} >&3 2>&3; then
rm -r "${ndtmpdir}"
else
info "NOTE: did not remove: ${ndtmpdir}"
@@ -691,7 +704,7 @@ update_binpkg() {
opensuse-leap)
DISTRO_COMPAT_NAME="opensuse"
;;
- almalinux|rocky|rhel)
+ cloudlinux|almalinux|rocky|rhel)
DISTRO_COMPAT_NAME="centos"
;;
*)