From 86b327dac4b54b077e1deeb4737f31d8a54f4859 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 11 Jun 2015 17:21:23 +0200 Subject: [PATCH] fixed hasher search --- hashboot.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hashboot.sh b/hashboot.sh index 7d64a20..b0bd59c 100755 --- a/hashboot.sh +++ b/hashboot.sh @@ -45,12 +45,12 @@ fi #Try different hashers, use the most secure HASHER=$(/usr/bin/which --skip-dot --skip-tilde sha512sum 2> /dev/null) -test -z ${HASHER} && $(/usr/bin/which --skip-dot --skip-tilde sha384sum 2> /dev/null) -test -z ${HASHER} && $(/usr/bin/which --skip-dot --skip-tilde sha256sum 2> /dev/null) -test -z ${HASHER} && $(/usr/bin/which --skip-dot --skip-tilde sha224sum 2> /dev/null) +test -z ${HASHER} && HASHER=$(/usr/bin/which --skip-dot --skip-tilde sha384sum 2> /dev/null) +test -z ${HASHER} && HASHER=$(/usr/bin/which --skip-dot --skip-tilde sha256sum 2> /dev/null) +test -z ${HASHER} && HASHER=$(/usr/bin/which --skip-dot --skip-tilde sha224sum 2> /dev/null) #It gets insecure below here, but better than nothing? -test -z ${HASHER} && $(/usr/bin/which --skip-dot --skip-tilde sha1sum 2> /dev/null) -test -z ${HASHER} && $(/usr/bin/which --skip-dot --skip-tilde md5sum 2> /dev/null) +test -z ${HASHER} && HASHER=$(/usr/bin/which --skip-dot --skip-tilde sha1sum 2> /dev/null) +test -z ${HASHER} && HASHER=$(/usr/bin/which --skip-dot --skip-tilde md5sum 2> /dev/null) #If we found no hasher: exit if [ -z ${HASHER} ]