diff --git a/lib/image-helpers.sh b/lib/image-helpers.sh index 5a9b637237..e8217a699d 100644 --- a/lib/image-helpers.sh +++ b/lib/image-helpers.sh @@ -116,7 +116,7 @@ customize_image() display_alert "Calling image customization script" "customize-image.sh" "info" chroot "${SDCARD}" /bin/bash -c "/tmp/customize-image.sh $RELEASE $LINUXFAMILY $BOARD $BUILD_DESKTOP" CUSTOMIZE_IMAGE_RC=$? - umount "${SDCARD}"/tmp/overlay + umount -i "${SDCARD}"/tmp/overlay mountpoint -q "${SDCARD}"/tmp/overlay || rm -r "${SDCARD}"/tmp/overlay if [[ $CUSTOMIZE_IMAGE_RC != 0 ]]; then exit_with_error "customize-image.sh exited with error (rc: $CUSTOMIZE_IMAGE_RC)"