From: Michael Prokop Date: Tue, 23 Jun 2020 13:48:08 +0000 (+0200) Subject: Do not fail if ISO doesn't have grub.cfg inside efi.img X-Git-Tag: v0.18.3~4 X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=b1798d19e92f6c87fb9850e9805e68df6c789646 Do not fail if ISO doesn't have grub.cfg inside efi.img 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 92ffc08bb28f73c --- diff --git a/grml2usb b/grml2usb index 0199fd6..d206f1d 100755 --- a/grml2usb +++ b/grml2usb @@ -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(