From c2b051c8a5daac6cf874e6cc7eb79878e2203153 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 16 Jul 2012 18:57:11 -0400 Subject: [PATCH] Use "linuxefi" and "initrdefi" where appropriate. --- util/grub.d/10_linux.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 87a7da34982..37d539fcf93 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -139,9 +139,16 @@ linux_entry () printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/" fi message="$(gettext_printf "Loading Linux %s ..." ${version})" + if [ -d /sys/firmware/efi ]; then + linuxcmd=linuxefi + initrdcmd=initrdefi + else + linuxcmd=linux + initrdcmd=initrd + fi sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} + ${linuxcmd} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. @@ -152,7 +159,7 @@ EOF done sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - initrd $(echo $initrd_path) + ${initrdcmd} $(echo $initrd_path) EOF fi sed "s/^/$submenu_indentation/" << EOF