Blame SOURCES/0112-Add-support-for-UEFI-operating-systems-returned-by-o.patch

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: Matthew Garrett <matthew.garrett@nebula.com>
f731ee
Date: Wed, 12 Jun 2013 11:51:49 -0400
f731ee
Subject: [PATCH] Add support for UEFI operating systems returned by os-prober
f731ee
f731ee
os-prober returns UEFI operating systems in the form:
f731ee
f731ee
path:long-name:name
f731ee
f731ee
where path is the path under the EFI directory on the ESP. This is in
f731ee
contrast to legacy OSes, where path is the device string. Handle this case.
f731ee
---
f731ee
 util/grub.d/30_os-prober.in | 22 ++++++++++++++++++----
f731ee
 1 file changed, 18 insertions(+), 4 deletions(-)
f731ee
f731ee
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
f731ee
index 6f38c82a554..9f955abb788 100644
f731ee
--- a/util/grub.d/30_os-prober.in
f731ee
+++ b/util/grub.d/30_os-prober.in
f731ee
@@ -322,9 +322,23 @@ EOF
f731ee
 EOF
f731ee
     ;;
f731ee
     *)
f731ee
-      echo -n "  "
f731ee
-      # TRANSLATORS: %s is replaced by OS name.
f731ee
-      gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
f731ee
-    ;;
f731ee
+      case ${DEVICE} in
f731ee
+	*.efi)
f731ee
+	  cat << EOF
f731ee
+menuentry '$(echo "${LONGNAME}" | grub_quote)' {
f731ee
+EOF
f731ee
+	  save_default_entry | grub_add_tab
f731ee
+	  cat << EOF
f731ee
+	  chainloader /EFI/${DEVICE}
f731ee
+	  boot
f731ee
+}
f731ee
+EOF
f731ee
+	  ;;
f731ee
+	*)
f731ee
+          echo -n "  "
f731ee
+          # TRANSLATORS: %s is replaced by OS name.
f731ee
+          gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
f731ee
+        ;;
f731ee
+      esac
f731ee
   esac
f731ee
 done