From 3a053ddfc83684145e4bb3149d60fca2ef034c41 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Fri, 11 Aug 2023 15:36:23 +0700 Subject: [PATCH] grub-efi-autoupdate: also set GRUB_REMOVABLE, if /BOOT/EFI/grub.cfg is exist If shim is not installed, then /BOOT/EFI/grub*.efi will be missing. grub will be named boot*.efi. However, /BOOT/EFI/grub.cfg may exist. See: https://bugzilla.altlinux.org/41959 Signed-off-by: Anton Midyukov --- grub-efi-autoupdate | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grub-efi-autoupdate b/grub-efi-autoupdate index 844788721..f10967fa2 100755 --- a/grub-efi-autoupdate +++ b/grub-efi-autoupdate @@ -25,7 +25,8 @@ GRUB_REMOVABLE= if ! stat $EFI_DIR/EFI/$DIST/grub*.efi > /dev/null 2>&1; then echo "$EFI_DIR/EFI/$DIST/grub*.efi is missing, not fatal yet." - if ! stat $EFI_DIR/EFI/BOOT/grub*.efi > /dev/null 2>&1; then + if ! stat $EFI_DIR/EFI/BOOT/grub*.efi > /dev/null 2>&1 && + ! stat $EFI_DIR/EFI/BOOT/grub.cfg > /dev/null 2>&1; then echo echo "$EFI_DIR/EFI/BOOT/grub*.efi is missing too. Fatal." echo "Nothing to update. Please run: grub-install && grub-efi-autoupdate" -- 2.33.8