2012-11-28 10:34:03 +01:00
|
|
|
From 151b1691fe0cf885df101c6e6a7cb1defc50428b Mon Sep 17 00:00:00 2001
|
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Mon, 16 Jul 2012 18:57:11 -0400
|
|
|
|
Subject: [PATCH] Use "linuxefi" and "initrdefi" where appropriate
|
|
|
|
|
|
|
|
References: fate#314485
|
|
|
|
Patch-Mainline: no
|
|
|
|
|
|
|
|
Signed-off-by: Michael Chang <mchang@suse.com>
|
|
|
|
---
|
|
|
|
util/grub.d/10_linux.in | 18 ++++++++++++++++--
|
|
|
|
1 files changed, 16 insertions(+), 2 deletions(-)
|
|
|
|
|
2019-10-18 12:18:53 +02:00
|
|
|
Index: grub-2.04~rc1/util/grub.d/10_linux.in
|
2012-11-28 10:34:03 +01:00
|
|
|
===================================================================
|
2019-10-18 12:18:53 +02:00
|
|
|
--- grub-2.04~rc1.orig/util/grub.d/10_linux.in
|
|
|
|
+++ grub-2.04~rc1/util/grub.d/10_linux.in
|
|
|
|
@@ -145,10 +145,17 @@ linux_entry ()
|
2012-11-28 10:34:03 +01:00
|
|
|
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
|
|
|
|
fi
|
|
|
|
message="$(gettext_printf "Loading Linux %s ..." ${version})"
|
|
|
|
- sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
+ if [ -d /sys/firmware/efi ]; then
|
|
|
|
+ sed "s/^/$submenu_indentation/" << EOF
|
2015-10-30 11:01:48 +01:00
|
|
|
+ echo '$(echo "$message" | grub_quote)'
|
2015-10-06 10:47:39 +02:00
|
|
|
+ linuxefi ${rel_dirname}/${basename} ${root_device} ${args}
|
2012-11-28 10:34:03 +01:00
|
|
|
+EOF
|
|
|
|
+ else
|
|
|
|
+ sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
echo '$(echo "$message" | grub_quote)'
|
2015-04-13 19:58:16 +02:00
|
|
|
linux ${rel_dirname}/${basename} ${root_device} ${args}
|
2012-11-28 10:34:03 +01:00
|
|
|
EOF
|
|
|
|
+ fi
|
|
|
|
if test -n "${initrd}" ; then
|
|
|
|
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
|
|
|
message="$(gettext_printf "Loading initial ramdisk ...")"
|
2019-10-18 12:18:53 +02:00
|
|
|
@@ -156,10 +163,17 @@ EOF
|
|
|
|
for i in ${initrd}; do
|
|
|
|
initrd_path="${initrd_path} ${rel_dirname}/${i}"
|
|
|
|
done
|
2012-11-28 10:34:03 +01:00
|
|
|
- sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
+ if [ -d /sys/firmware/efi ]; then
|
|
|
|
+ sed "s/^/$submenu_indentation/" << EOF
|
2015-10-30 11:01:48 +01:00
|
|
|
+ echo '$(echo "$message" | grub_quote)'
|
2019-10-18 12:18:53 +02:00
|
|
|
+ initrdefi $(echo $initrd_path)
|
2012-11-28 10:34:03 +01:00
|
|
|
+EOF
|
|
|
|
+ else
|
|
|
|
+ sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
echo '$(echo "$message" | grub_quote)'
|
2019-10-18 12:18:53 +02:00
|
|
|
initrd $(echo $initrd_path)
|
2012-11-28 10:34:03 +01:00
|
|
|
EOF
|
|
|
|
+ fi
|
|
|
|
fi
|
|
|
|
sed "s/^/$submenu_indentation/" << EOF
|
|
|
|
}
|