@cryptotaxi247 / netdata-1 / commits / d27effa5d

netdata/packaging/kickstart: fix kickstart (#5771)

* netdata/packaging/kickstart: import the newly created safe_sha256sum() bash function * netdata/packaging: add new md5sums

Paul Emm. Katsoulakis committed Apr 2, 2019 at 11:36 UTC d27effa5d0d658dc04d45a89fa8ec86c582e2916
3 files changed +27 -2
packaging/installer/README.md
+2 -2
@@ -42,7 +42,7 @@ bash <(curl -Ss https://my-netdata.io/kickstart.sh)
42 Verify the integrity of the script with this:
43
44 ```bash
45 -[ "dec269c623667e132b4b179b9b77fcaf" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
45 +[ "4e339c2e66192c122484476ef48b6843" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
46 ```
47 *It should print `OK, VALID` if the script is the one we ship.*
48
@@ -96,7 +96,7 @@ To install Netdata with a binary package on any Linux distro, any kernel version
96 Verify the integrity of the script with this:
97
98 ```bash
99 -[ "9f5e63e50ec4322f65064b446cff8dc5" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
99 +[ "9a8fec4af9aba11614381f9cd187a68b" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
100 ```
101
102 *It should print `OK, VALID` if the script is the one we ship.*
packaging/installer/kickstart-static64.sh
+12
@@ -111,6 +111,18 @@ set_tarball_urls() {
111 fi
112 }
113
114 +function safe_sha256sum() {
115 + # Within the contexct of the installer, we only use -c option that is common between the two commands
116 + # We will have to reconsider if we start non-common options
117 + if command -v sha256sum >/dev/null 2>&1; then
118 + sha256sum $@
119 + elif command -v shasum >/dev/null 2>&1; then
120 + shasum -a 256 $@
121 + else
122 + fatal "I could not find a suitable checksum binary to use"
123 + fi
124 +}
125 +
126 # ---------------------------------------------------------------------------------------------------------------------
127 umask 022
128
packaging/installer/kickstart.sh
+13
@@ -204,6 +204,19 @@ dependencies() {
204 fi
205 }
206
207 +function safe_sha256sum() {
208 + # Within the contexct of the installer, we only use -c option that is common between the two commands
209 + # We will have to reconsider if we start non-common options
210 + if command -v sha256sum >/dev/null 2>&1; then
211 + sha256sum $@
212 + elif command -v shasum >/dev/null 2>&1; then
213 + shasum -a 256 $@
214 + else
215 + fatal "I could not find a suitable checksum binary to use"
216 + fi
217 +}
218 +
219 +# ---------------------------------------------------------------------------------------------------------------------
220 umask 022
221
222 sudo=""