summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2022-10-31 07:53:30 -0400
committerGitHub <noreply@github.com>2022-10-31 07:53:30 -0400
commit9e85dc2bc98a8c7934744a239f3010cf67ef595c (patch)
tree9e7af97205c52a54556a60880eea64e89a79796e /packaging
parent4dd4bd7c5ee73cd29f8f0fca627ee4cd4126bc24 (diff)
Prompt users about updates/claiming on unknown install types. (#13890)
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/installer/kickstart.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index d859f8cab5..082cf0d050 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
-# Next unused error code: F050C
+# Next unused error code: F050D
# ======================================================================
# Constants
@@ -902,7 +902,15 @@ handle_existing_install() {
return 0
elif [ "${INSTALL_TYPE}" = "unknown" ]; then
- fatal "We do not support trying to update or claim installations when we cannot determine the install type. You will need to uninstall the existing install using the same method you used to install it to proceed." F0106
+ if [ "${INTERACTIVE}" -eq 0 ] && [ "${NETDATA_CLAIM_ONLY}" -eq 0 ]; then
+ fatal "We do not support trying to update or claim installations when we cannot determine the install type. You will need to uninstall the existing install using the same method you used to install it to proceed. If you just want to claim this install, you can re-run this command with the --claim-only option." F0106
+ elif [ "${INTERACTIVE}" -eq 1 ] && [ "${NETDATA_CLAIM_ONLY}" -eq 0 ]; then
+ if confirm "Attempting to update an existing install is not officially supported. It may work, but it also might break your system. If you just want to claim this install, you should re-run this command with the --claim-only option instead. Are you sure you want to continue?"; then
+ progress "OK, continuing"
+ else
+ fatal "Cancelling update of unknown installation type at user request." F050C
+ fi
+ fi
fi
ret=0