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