@cryptotaxi247 / netdata-1 / commits / aaa8c8c89

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

Ilya Mashchenko committed Jun 18, 2021 at 16:51 UTC aaa8c8c894c80ad037605f680645dc1a69e0eca8
2 files changed +5 -3
packaging/installer/kickstart-static64.sh
+4 -2
@@ -207,13 +207,15 @@ safe_sha256sum() {
207 }
208
209 mark_install_type() {
210 - install_type_file="/opt/netdata/etc/netdata/.install-type"
210 + install_type_file="/opt/netdata/etc/netdata/.install-type"
211 + if [ -f "${install_type_file}" ]; then
212 # shellcheck disable=SC1090
213 . "${install_type_file}"
213 - cat > "${install_type_file}" <<-EOF
214 + cat > "${install_type_file}" <<- EOF
215 INSTALL_TYPE='kickstart-static'
216 PREBUILT_ARCH='${PREBUILT_ARCH}'
217 EOF
218 + fi
219 }
220
221 # ----------------------------------------------------------------------------
packaging/installer/methods/kickstart-64.md
+1 -1
@@ -97,7 +97,7 @@ To use `md5sum` to verify the integrity of the `kickstart-static64.sh` script yo
97 command above, run the following:
98
99 ```bash
100 -[ "d80cb6e7b48f2825aade13120ec5364d" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
100 +[ "b723476b538065d280d44387403cabed" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
101 ```
102
103 If the script is valid, this command will return `OK, VALID`.