diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 8b7883072e..31a72a39e0 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -110,8 +110,7 @@ do done os_name=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g') -if test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg" &&\ - mountpoint -q /boot/efi; then +if test -s "${grub_cfg}" && test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg"; then gettext_printf "Running \`grub2-mkconfig -o %s' will overwrite the GRUB wrapper.\n" "$grub_cfg" 1>&2 gettext_printf "Please run \`grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.\n" 1>&2 gettext_printf "GRUB configuration file was not updated.\n" 1>&2