summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2021-06-18 16:51:27 +0300
committerGitHub <noreply@github.com>2021-06-18 09:51:27 -0400
commitaaa8c8c894c80ad037605f680645dc1a69e0eca8 (patch)
treed3eabf9b59a37a94d39634784181215c79fc377c
parent2478279dbbca10457412db3b1d9c396f481cc675 (diff)
fix kickstart-static64.sh install script fail when trying to access `.install-type` before it is created (#11262)
* packaging: fix crash when trying to access .install-type * fix checksums * use -f * update checksum
-rwxr-xr-xpackaging/installer/kickstart-static64.sh6
-rw-r--r--packaging/installer/methods/kickstart-64.md2
2 files changed, 5 insertions, 3 deletions
diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh
index f29e3b094a..8010561945 100755
--- a/packaging/installer/kickstart-static64.sh
+++ b/packaging/installer/kickstart-static64.sh
@@ -207,13 +207,15 @@ safe_sha256sum() {
}
mark_install_type() {
- install_type_file="/opt/netdata/etc/netdata/.install-type"
+ install_type_file="/opt/netdata/etc/netdata/.install-type"
+ if [ -f "${install_type_file}" ]; then
# shellcheck disable=SC1090
. "${install_type_file}"
- cat > "${install_type_file}" <<-EOF
+ cat > "${install_type_file}" <<- EOF
INSTALL_TYPE='kickstart-static'
PREBUILT_ARCH='${PREBUILT_ARCH}'
EOF
+ fi
}
# ----------------------------------------------------------------------------
diff --git a/packaging/installer/methods/kickstart-64.md b/packaging/installer/methods/kickstart-64.md
index 6ff74203dc..3418ad141e 100644
--- a/packaging/installer/methods/kickstart-64.md
+++ b/packaging/installer/methods/kickstart-64.md
@@ -97,7 +97,7 @@ To use `md5sum` to verify the integrity of the `kickstart-static64.sh` script yo
command above, run the following:
```bash
-[ "d80cb6e7b48f2825aade13120ec5364d" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
+[ "b723476b538065d280d44387403cabed" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```
If the script is valid, this command will return `OK, VALID`.