Blame SOURCES/0092-Use-linuxefi-and-initrdefi-where-appropriate.patch

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