More work on sha256sum

This commit is contained in:
2023-01-14 10:32:29 -05:00
parent f504f3e89b
commit 4c130e347c

View File

@@ -388,11 +388,11 @@ verifyImage() {
debug "Failed to download checksum"
fi
for file in "$FACTORYIMGGZFNAME" "$SYSUPGRADEIMGGZFNAME"; do
for file in "$FACTORYIMGGZ" "$SYSUPGRADEIMGGZ"; do
[[ -f $file ]] || break
checksum=$(grep "$file" "$SHA256_FILE" | cut -f1 -d' ')
checksum=$(grep "${file##*/}" "$SHA256_FILE" | cut -f1 -d' ')
debug "checksum: $checksum"
echo "$checksum $file" | sha256sum --check --status
echo -n "$checksum $file" | sha256sum --check --status
debug "checksum return code: $?"
done
fi