Skip to content

Commit

Permalink
Do not fail if ISO doesn't have grub.cfg inside efi.img
Browse files Browse the repository at this point in the history
If an ISO doesn't support Secure Boot then the grub.cfg file doesn't
exist inside the efi.img, so we shouldn't continue with its execution.
Use search_file() instead which is unset if the file doesn't exist and
therefore execution gets skipped.

Follow up fix for commit 92ffc08
  • Loading branch information
mika committed Jun 23, 2020
1 parent 92ffc08 commit b1798d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grml2usb
Expand Up @@ -1760,7 +1760,7 @@ def handle_secure_boot(target, efi_img):
logging.critical("Fatal: %s", error)
sys.exit(1)

grub_cfg = efi_mountpoint + "/boot/grub/grub.cfg"
grub_cfg = search_file("grub.cfg", efi_mountpoint + "/boot/grub/")
logging.debug("grub_cfg = %s" % grub_cfg)
if not grub_cfg:
logging.info(
Expand Down

0 comments on commit b1798d1

Please sign in to comment.