Skip to content

Commit e54d813

Browse files
nfrayerlsandov1
authored andcommitted
grub/mkconfig: Remove check for mount point for grub cfg stub
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]>
1 parent 5986c65 commit e54d813

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

util/grub-mkconfig.in

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ do
110110
done
111111

112112
os_name=$(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/' -e 's/\"//g')
113-
if test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg" &&\
114-
mountpoint -q /boot/efi; then
113+
if test -s "${grub_cfg}" && test "x${grub_cfg}" = "x/boot/efi/EFI/$os_name/grub.cfg"; then
115114
gettext_printf "Running \`grub2-mkconfig -o %s' will overwrite the GRUB wrapper.\n" "$grub_cfg" 1>&2
116115
gettext_printf "Please run \`grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.\n" 1>&2
117116
gettext_printf "GRUB configuration file was not updated.\n" 1>&2

0 commit comments

Comments
 (0)