58a808c
From 151b1691fe0cf885df101c6e6a7cb1defc50428b Mon Sep 17 00:00:00 2001
58a808c
From: Peter Jones <pjones@redhat.com>
58a808c
Date: Mon, 16 Jul 2012 18:57:11 -0400
58a808c
Subject: [PATCH] Use "linuxefi" and "initrdefi" where appropriate.
58a808c
58a808c
---
58a808c
 util/grub.d/10_linux.in |   18 ++++++++++++++++--
58a808c
 1 file changed, 16 insertions(+), 2 deletions(-)
58a808c
58a808c
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
58a808c
index cd543bd..e2b8ab3 100644
58a808c
--- a/util/grub.d/10_linux.in
58a808c
+++ b/util/grub.d/10_linux.in
58a808c
@@ -133,17 +133,31 @@ linux_entry ()
58a808c
     printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
58a808c
   fi
58a808c
   message="$(gettext_printf "Loading Linux %s ..." ${version})"
58a808c
-  sed "s/^/$submenu_indentation/" << EOF
58a808c
+  if [ -d /sys/firmware/efi ]; then
58a808c
+    sed "s/^/$submenu_indentation/" << EOF
58a808c
+	echo	'$message'
58a808c
+	linuxefi ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
58a808c
+EOF
58a808c
+  else
58a808c
+    sed "s/^/$submenu_indentation/" << EOF
58a808c
 	echo	'$message'
58a808c
 	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
58a808c
 EOF
58a808c
+  fi
58a808c
   if test -n "${initrd}" ; then
58a808c
     # TRANSLATORS: ramdisk isn't identifier. Should be translated.
58a808c
     message="$(gettext_printf "Loading initial ramdisk ...")"
58a808c
-    sed "s/^/$submenu_indentation/" << EOF
58a808c
+    if [ -d /sys/firmware/efi ]; then
58a808c
+      sed "s/^/$submenu_indentation/" << EOF
58a808c
+	echo	'$message'
58a808c
+	initrdefi ${rel_dirname}/${initrd}
58a808c
+EOF
58a808c
+    else
58a808c
+      sed "s/^/$submenu_indentation/" << EOF
58a808c
 	echo	'$message'
58a808c
 	initrd	${rel_dirname}/${initrd}
58a808c
 EOF
58a808c
+    fi
58a808c
   fi
58a808c
   sed "s/^/$submenu_indentation/" << EOF
58a808c
 }
58a808c
-- 
58a808c
1.7.10.4
58a808c