summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/image_signing/sign_official_build.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh
index a3f7c98e..83f31c6f 100755
--- a/scripts/image_signing/sign_official_build.sh
+++ b/scripts/image_signing/sign_official_build.sh
@@ -714,7 +714,11 @@ update_legacy_bootloader() {
local esp_dir="$(make_temp_dir)"
# We use the 'unsafe' variant because the EFI system partition is vfat type
# and can be mounted in RW mode.
- _mount_image_partition_retry "${image}" "${esp_partnum}" "${esp_dir}"
+ if ! _mount_image_partition_retry "${image}" "${esp_partnum}" \
+ "${esp_dir}"; then
+ error "Could not mount EFI partition for updating legacy bootloader cfg."
+ return 1
+ fi
# If we can't find the dm parameter in the kernel config, bail out now.
local kernel_config=$(grab_kernel_config "${image}" "${dm_partno}")