talos II: die when tgz archive is corrupt

This commit is contained in:
Thierry Laurion 2022-11-14 18:05:32 -05:00
parent a9bee2885b
commit 83591fbbc1
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -167,7 +167,7 @@ if [ "$READ" -eq 0 ] && [ "${ROM##*.}" = tgz ]; then
rm -rf /tmp/verified_rom
mkdir /tmp/verified_rom
tar -C /tmp/verified_rom -xf $ROM
tar -C /tmp/verified_rom -xf $ROM || die "Rom archive $ROM could not be extracted"
if ! (cd /tmp/verified_rom/ && sha256sum -cs hashes.txt); then
die "Provided tgz image did not pass hash verification"
fi