Fixed bugs I introduced while fixing warnings. :-D

master
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
1 changed files with 5 additions and 5 deletions

View File

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