1
1
mirror of https://schlomp.space/tastytea/hashboot synced 2024-11-07 15:19:17 +01:00

Fixed bugs I introduced while fixing warnings. :-D

This commit is contained in:
tastytea 2019-06-21 03:30:57 +02:00
parent 023bd8b2de
commit c06b25c54a
No known key found for this signature in database
GPG Key ID: CFC39497F1B26E07

@ -68,7 +68,7 @@ write_hashes ()
if [ $((CKMODES & 010)) -ne 0 ]; then
#Write hashes of all regular files to ${file}
# shellcheck disable=SC2227
find /boot -type f -exec sh -c ${HASHER} --binary "${1}" >> "${file}" _ {} +
find /boot -type f -exec ${HASHER} --binary {} >> "${file}" +
fi
if [ $((CKMODES & 100)) -ne 0 ]; then
#read bios to file
@ -191,10 +191,10 @@ fi
if [ "${1}" == "index" ]
then
#Try different hashers, use the most secure
HASHER=$(command -v sha512sum > /dev/null)
test -z "${HASHER}" && HASHER=$(command -v sha384sum > /dev/null)
test -z "${HASHER}" && HASHER=$(command -v sha256sum > /dev/null)
test -z "${HASHER}" && HASHER=$(command -v sha224sum > /dev/null)
HASHER=$(command -v sha512sum)
test -z "${HASHER}" && HASHER=$(command -v sha384sum)
test -z "${HASHER}" && HASHER=$(command -v sha256sum)
test -z "${HASHER}" && HASHER=$(command -v sha224sum)
#If we found no hasher: exit
[ -z "${HASHER}" ] && die 5 "No hash calculator found"