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