Remove unnescesary ‘cleanup’ code. (#13103)
This was causing the updter to be unconditionally disabled on static builds, and we don’t actually _need_ any of it anymore since we’ve already decoupled the auto-update handling state from the installation process (in fact, this should have been removed then, but it got missed somehow).
Austin S. Hemmelgarn committed
Jun 9, 2022 at 13:56 UTC
4ff9958519458506c3d70da2697bdf5d394061a9
2 files changed
-30
packaging/installer/functions.sh
-29
@@ -981,35 +981,6 @@ install_netdata_updater() {
981
return 0
982
}
983
984
-cleanup_old_netdata_updater() {
985
- if [ -f "${NETDATA_PREFIX}"/usr/libexec/netdata-updater.sh ]; then
986
- echo >&2 "Removing updater from deprecated location"
987
- rm -f "${NETDATA_PREFIX}"/usr/libexec/netdata-updater.sh
988
- fi
989
-
990
- if issystemd && [ -n "$(get_systemd_service_dir)" ] ; then
991
- systemctl disable netdata-updater.timer
992
- rm -f "$(get_systemd_service_dir)/netdata-updater.timer"
993
- rm -f "$(get_systemd_service_dir)/netdata-updater.service"
994
- fi
995
-
996
- if [ -d /etc/cron.daily ]; then
997
- rm -f /etc/cron.daily/netdata-updater.sh
998
- rm -f /etc/cron.daily/netdata-updater
999
- fi
1000
-
1001
- if [ -d /etc/periodic/daily ]; then
1002
- rm -f /etc/periodic/daily/netdata-updater.sh
1003
- rm -f /etc/periodic/daily/netdata-updater
1004
- fi
1005
-
1006
- if [ -d /etc/cron.d ]; then
1007
- rm -f /etc/cron.d/netdata-updater
1008
- fi
1009
-
1010
- return 0
1011
-}
1012
-
984
set_netdata_updater_channel() {
985
sed -i -e "s/^RELEASE_CHANNEL=.*/RELEASE_CHANNEL=\"${RELEASE_CHANNEL}\"/" "${NETDATA_USER_CONFIG_DIR}/.environment"
986
}
packaging/makeself/install-or-update.sh
-1
@@ -154,7 +154,6 @@ set_netdata_updater_channel || run_failed "Cannot set netdata updater tool relea
154
155
# -----------------------------------------------------------------------------
156
progress "Install (but not enable) netdata updater tool"
157
-cleanup_old_netdata_updater || run_failed "Cannot cleanup old netdata updater tool."
157
install_netdata_updater || run_failed "Cannot install netdata updater tool."
158
159
# -----------------------------------------------------------------------------