From 94a94bf3d6db0b5854e3177b69311122c8933613 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Wed, 5 May 2021 13:48:56 +0200 Subject: [PATCH] mxgrub: Fix check if GRUB is installed on ESP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The condition checked for a directory, but it’s a file, and therefore GRUB was always installed anew on the ESP. With the fixed condition it works now. $ sudo mxgrub mariux-5.12.0-381 mount -L ESP /boot/efi GRUB for UEFI is already installed. umount /boot/efi GRUB is already installed in MBR. grub-editenv - set chosen=all-other-kernel>mariux-5.12.0-381 Resolves: https://github.molgen.mpg.de/mariux64/mxtools/issues/180 --- mxgrub/mxgrub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxgrub/mxgrub b/mxgrub/mxgrub index aa489b0..892ec5f 100755 --- a/mxgrub/mxgrub +++ b/mxgrub/mxgrub @@ -325,7 +325,7 @@ sub cmd_install { if (has_esp) { sys 'mount','-L','ESP','/boot/efi'; - if (-d '/boot/efi/EFI/grub/grubx64.efi') { + if (-e '/boot/efi/EFI/grub/grubx64.efi') { print "GRUB for UEFI is already installed.\n"; } else {