From aaa8c8c894c80ad037605f680645dc1a69e0eca8 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Fri, 18 Jun 2021 16:51:27 +0300 Subject: 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 --- packaging/installer/kickstart-static64.sh | 6 ++++-- packaging/installer/methods/kickstart-64.md | 2 +- 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`. -- cgit v1.2.3