Skip to content

Commit

Permalink
grub/mkconfig: Remove check for mount point for grub cfg stub
Browse files Browse the repository at this point in the history
Remove mountpoint when checking whether or not the grub cfg stub
exists and add -s to the test. This should cover scenarios where
the ESP doesn't have a seperate partition but still uses a grub
cfg stub

Signed-off-by: Nicolas Frayer <[email protected]>
  • Loading branch information
nfrayer committed Aug 12, 2024
1 parent b271a74 commit ad924e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/grub-mkconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad924e4

Please sign in to comment.