diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-06-07 13:07:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-07 13:07:45 +0300 |
commit | 731fb01d398c1fceac6bb3a3686d67d92f0916aa (patch) | |
tree | e2e8513afaec899a4a919074e5a582f5ba328a6a | |
parent | 5902130c61d89a33b34be1c07a46c978edc5b722 (diff) |
fix(updater): don't produce any output if binpkg update completed successfully (#13081)
* don't produce any output when binpkg update succeeded
* redirect update repo, update netdata output to 3
-rwxr-xr-x | packaging/installer/netdata-updater.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index 8d17ee0166..f33527d9f2 100755 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -764,22 +764,23 @@ update_binpkg() { if [ -n "${repo_subcmd}" ]; then # shellcheck disable=SC2086 - env ${env} ${pm_cmd} ${repo_subcmd} ${repo_update_opts} || fatal "Failed to update repository metadata." U000C + env ${env} ${pm_cmd} ${repo_subcmd} ${repo_update_opts} >&3 2>&3 || fatal "Failed to update repository metadata." U000C fi for repopkg in netdata-repo netdata-repo-edge; do if ${pkg_installed_check} ${repopkg} > /dev/null 2>&1; then # shellcheck disable=SC2086 - env ${env} ${pm_cmd} ${upgrade_cmd} ${pkg_install_opts} ${repopkg} || fatal "Failed to update Netdata repository config." U000D + env ${env} ${pm_cmd} ${upgrade_cmd} ${pkg_install_opts} ${repopkg} >&3 2>&3 || fatal "Failed to update Netdata repository config." U000D # shellcheck disable=SC2086 if [ -n "${repo_subcmd}" ]; then - env ${env} ${pm_cmd} ${repo_subcmd} ${repo_update_opts} || fatal "Failed to update repository metadata." U000E + env ${env} ${pm_cmd} ${repo_subcmd} ${repo_update_opts} >&3 2>&3 || fatal "Failed to update repository metadata." U000E fi fi done # shellcheck disable=SC2086 - env ${env} ${pm_cmd} ${upgrade_cmd} ${pkg_install_opts} netdata || fatal "Failed to update Netdata package." U000F + env ${env} ${pm_cmd} ${upgrade_cmd} ${pkg_install_opts} netdata >&3 2>&3 || fatal "Failed to update Netdata package." U000F + [ -n "${logfile}" ] && rm "${logfile}" && logfile= } # Simple function to encapsulate original updater behavior. |