Index: scripts/image_signing/sign_official_build.sh |
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh |
index 8b61f39f93f4113a04c2b0d3e7adda807dcc9df6..7c0018c75c23afa164a62c30bbd53de1545c4f79 100755 |
--- a/scripts/image_signing/sign_official_build.sh |
+++ b/scripts/image_signing/sign_official_build.sh |
@@ -301,12 +301,17 @@ verify_image() { |
local expected_hash=$(get_hash_from_config "${new_kernel_config}") |
local got_hash=$(get_hash_from_config "${kernel_config}") |
+ if [ -z "${expected_hash}" ]; then |
+ echo "FAILED: RootFS hash is empty!" |
+ exit 1 |
+ fi |
if [ ! "${got_hash}" = "${expected_hash}" ]; then |
cat <<EOF |
FAILED: RootFS hash is incorrect. |
Expected: ${expected_hash} |
Got: ${got_hash} |
EOF |
+ exit 1 |
else |
echo "PASS: RootFS hash is correct (${expected_hash})" |
fi |