summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/image_signing/sign_official_build.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh
index f6126878..8d782add 100755
--- a/scripts/image_signing/sign_official_build.sh
+++ b/scripts/image_signing/sign_official_build.sh
@@ -476,9 +476,12 @@ resign_firmware_payload() {
local shellball_dir=$(make_temp_dir)
# extract_firmware_bundle can fail if the image has no firmware update.
- extract_firmware_bundle "${firmware_bundle}" "${shellball_dir}" ||
- { echo "Didn't find a firmware update. Not signing firmware."
- return; }
+ if ! extract_firmware_bundle "${firmware_bundle}" "${shellball_dir}"; then
+ # Unmount now to prevent changes.
+ sudo umount "${rootfs_dir}"
+ echo "Didn't find a firmware update. Not signing firmware."
+ return
+ fi
echo "Found a valid firmware update shellball."
local image_file sign_args=() loem_sfx loem_output_dir