summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2022-04-27 10:12:31 -0400
committerGitHub <noreply@github.com>2022-04-27 10:12:31 -0400
commitd692a513030951e374e77af41c28c68a270f137c (patch)
tree1aaa2e8b13225551e6b18909c5cee20e61ba4b5d /packaging
parent0fc101679dcd12f1cb8acdd07bb4c85d8e553e53 (diff)
Treat auto-updates as a tristate internally. (#12634)
If no options are specified, use the value `default` to indicate that the default behavior is requested. Long-term, this will allow us to easily have different defaults depending on other installation parameters. Shorter term, it allows us to explicitly indicate in telemetry events whether the user asked for auto updates, asked for no auto updates, or just went with the default.
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/installer/kickstart.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index 8879fa805d..44b1ad7717 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -27,7 +27,7 @@ DRY_RUN=0
SELECTED_INSTALL_METHOD="none"
INSTALL_TYPE="unknown"
INSTALL_PREFIX=""
-NETDATA_AUTO_UPDATES="1"
+NETDATA_AUTO_UPDATES="default"
NETDATA_CLAIM_ONLY=0
NETDATA_CLAIM_URL="${PUBLIC_CLOUD_URL}"
NETDATA_DISABLE_CLOUD=0
@@ -223,6 +223,7 @@ telemetry_event() {
"error_message": "${2}",
"install_options": "${KICKSTART_OPTIONS}",
"install_interactivity": "${INTERACTIVE}",
+ "install_auto_updates": "${NETDATA_AUTO_UPDATES}",
"total_runtime": "${total_duration}",
"selected_install_method": "${SELECTED_INSTALL_METHOD}",
"netdata_release_channel": "${RELEASE_CHANNEL:-null}",
@@ -1085,7 +1086,7 @@ set_auto_updates() {
return 0
fi
- if [ "${NETDATA_AUTO_UPDATES}" = "1" ]; then
+ if [ "${AUTO_UPDATE}" -eq 1 ]; then
if [ "${DRY_RUN}" -eq 1 ]; then
progress "Would have attempted to enable automatic updates."
# This first case is for catching using a new kickstart script with an old build. It can be safely removed after v1.34.0 is released.
@@ -1831,6 +1832,12 @@ if [ -n "${STATIC_INSTALL_OPTIONS}" ]; then
fi
fi
+if [ "${NETDATA_AUTO_UPDATES}" = "default" ] || [ "${NETDATA_AUTO_UPDATES}" = "1" ]; then
+ AUTO_UPDATE=1
+else
+ AUTO_UPDATE=0
+fi
+
check_claim_opts
confirm_root_support
get_system_info