diff options
author | Paul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com> | 2019-04-01 18:25:51 +0200 |
---|---|---|
committer | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-04-01 18:25:50 +0200 |
commit | 2637740ff30669ec78d175d7d0d18294e07003f7 (patch) | |
tree | 593387aa653c865fd938b0e90ecfbf76ea5256d3 /packaging/installer/netdata-updater.sh | |
parent | 061643fb41c5d5ae6daa74251074cdfae6ecd88f (diff) |
netdata/packaging/installer: fix sha256sum failure on freeBSD (#5760)
* netdata/packaging/installer: Introduce safe_sha256sum - a more flexible checsum function
Due to #5747 we discovered that our installer wasnt working properly on FreeBSD.
We created within our functions lib a safe_sha256sum that picks between sha256sum and shasum, with priority to the first method
* netdata/packaging/installer: Update checksums in README
Diffstat (limited to 'packaging/installer/netdata-updater.sh')
-rw-r--r-- | packaging/installer/netdata-updater.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index 071198dd6c..1f3ba927a8 100644 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -79,10 +79,10 @@ update() { info "Newest version is already installed" else download "${NETDATA_TARBALL_URL}" "${dir}/netdata-latest.tar.gz" - if ! grep netdata-latest.tar.gz sha256sum.txt | sha256sum --check - >&3 2>&3; then + if ! grep netdata-latest.tar.gz sha256sum.txt | safe_sha256sum -c - >&3 2>&3; then failed "Tarball checksum validation failed. Stopping netdata upgrade and leaving tarball in ${dir}" fi - NEW_CHECKSUM="$(sha256sum netdata-latest.tar.gz 2>/dev/null| cut -d' ' -f1)" + NEW_CHECKSUM="$(safe_sha256sum netdata-latest.tar.gz 2>/dev/null| cut -d' ' -f1)" tar -xf netdata-latest.tar.gz >&3 2>&3 rm netdata-latest.tar.gz >&3 2>&3 cd netdata-* |