diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-01-14 07:45:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 07:45:57 -0500 |
commit | cc0de9f292c4bc1e91a8ec27114624c3b4e8becf (patch) | |
tree | 79a73aa59833d4eb02ca5b1811dbb4ddc89d2677 /packaging/makeself/install-or-update.sh | |
parent | 51e6a41ab140daeaefdbeb1349ac098aa97145ce (diff) |
Make auto-updates work on kickstart-static64 installs. (#7704)
* Store only the options for reinstall, not the full command.
This simplifies handling of updates with the static installer.
* Properly utilize the updater for static installs.
* Disable auto-updater when using local files.
If using local files, we can probably assume a system without a network
connection, so don't enable the auto-updater.
* Document support for auto-updates from kickstart-static64
* Fix infinite loop in auto-update option.
* Update kickstart-static64 checksum in docs.
* Remove unnecessary `sed` argument.
Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
Diffstat (limited to 'packaging/makeself/install-or-update.sh')
-rwxr-xr-x | packaging/makeself/install-or-update.sh | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index c287fd38c1..330cfc5798 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -25,15 +25,31 @@ fi STARTIT=1 AUTOUPDATE=0 +REINSTALL_OPTIONS="" RELEASE_CHANNEL="nightly" # check .travis/create_artifacts.sh before modifying while [ "${1}" ]; do case "${1}" in - "--dont-start-it") STARTIT=0;; - "--auto-update"|"-u") AUTOUPDATE=1;; - "--stable-channel") RELEASE_CHANNEL="stable";; - "--nightly-channel") RELEASE_CHANNEL="nightly";; - "--disable-telemetry") DISABLE_TELEMETRY=1;; + "--dont-start-it") + STARTIT=0 + REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" + ;; + "--auto-update"|"-u") + AUTOUPDATE=1 + REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" + ;; + "--stable-channel") + RELEASE_CHANNEL="stable" + REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" + ;; + "--nightly-channel") + RELEASE_CHANNEL="nightly" + REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" + ;; + "--disable-telemetry") + DISABLE_TELEMETRY=1 + REINSTALL_OPTIONS="${REINSTALL_OPTIONS} ${1}" + ;; *) echo >&2 "Unknown option '${1}'. Ignoring it.";; esac @@ -241,6 +257,11 @@ then run chmod 4750 bin/fping fi +# ----------------------------------------------------------------------------- + +echo "Save install options" +grep -qv 'IS_NETDATA_STATIC_BINARY="yes"' "${NETDATA_PREFIX}/etc/netdata/.environment" || echo IS_NETDATA_STATIC_BINARY=\"yes\" >> "${NETDATA_PREFIX}/etc/netdata/.environment" +sed -i "s/REINSTALL_OPTIONS=\".*\"/REINSTALL_OPTIONS=\"${REINSTALL_OPTIONS}\"/" "${NETDATA_PREFIX}/etc/netdata/.environment" # ----------------------------------------------------------------------------- if [ ${STARTIT} -eq 0 ]; then |