From 47eae88b27233fa327d58e5259b4d93a5d80570c Mon Sep 17 00:00:00 2001 From: Gleb Fotengauer-Malinovskiy Date: Wed, 9 Aug 2023 12:43:43 +0000 Subject: [PATCH] mki-pack-boot: Do not imply grub-efi for isolinux and grubpcboot boot types This change is necessary to ensure backward compatibility. It reinstates support for the EFI_BOOTLOADER variable; however, this support is limited to the deprecated isolinux and grubpcboot boot types. Fixes: 7539914 ("tools/mki-pack-boot: rework boot modes support") Reported-by: Anton Midyukov Signed-off-by: Gleb Fotengauer-Malinovskiy --- tools/mki-pack-boot | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/mki-pack-boot b/tools/mki-pack-boot index 14f08ca..22fc4f3 100755 --- a/tools/mki-pack-boot +++ b/tools/mki-pack-boot @@ -9,6 +9,7 @@ verbose "has started executing." BOOT_TYPE="${BOOT_TYPE:?boot type required}" +EFI_BOOTLOADER="${EFI_BOOTLOADER:-}" outname="${MKI_OUTNAME:-outname}" outname="${outname##*/}" @@ -36,14 +37,18 @@ for b; do message 'WARNING: use either isolinux-boot (if you want isolinux),' message 'WARNING: or "isolinux-boot grub-efi" (if you want isolinux + EFI).' boot_isolinux=1 - boot_grub_efi=1 + if [ "$EFI_BOOTLOADER" = grub-efi ]; then + boot_grub_efi=1 + fi ;; grubpcboot) message 'WARNING: the grubpcboot boot type is deprecated!' message 'WARNING: use either grub-pc-boot (if you want grub-pc),' message 'WARNING: or "grub-pc-boot grub-efi" (if you want grub-pc + EFI).' boot_grubpcboot=1 - boot_grub_efi=1 + if [ "$EFI_BOOTLOADER" = grub-efi ]; then + boot_grub_efi=1 + fi ;; efiboot|grubaa64boot) message "WARNING: the '$b' boot type is deprecated!" @@ -64,7 +69,7 @@ done # The EFI_BOOTLOADER had previously supported other values here. Therefore, # it's better to fail early if the profile specifies an EFI bootloader that is # not supported. -case "${EFI_BOOTLOADER:-}" in +case "$EFI_BOOTLOADER" in ''|grub-efi) ;; *) fatal "$EFI_BOOTLOADER EFI bootloader is not supported!" ;; esac