summaryrefslogtreecommitdiff
path: root/sys-boot/grub/files/grub-2.00-os-prober-efi-system.patch
blob: 7e0888a86daaa1625c3a73cab05047e384ef0aab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
=== modified file 'util/grub.d/30_os-prober.in'
--- util/grub.d/30_os-prober.in	2013-04-19 08:08:46 +0000
+++ util/grub.d/30_os-prober.in	2013-05-31 16:29:03 +0000
@@ -149,6 +149,22 @@
 }
 EOF
     ;;
+    efi)
+
+	EFIPATH=${DEVICE#*@}
+	DEVICE=${DEVICE%@*}
+	onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
+      cat << EOF
+menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' {
+EOF
+      save_default_entry | sed -e "s/^/\t/"
+      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+
+      cat <<EOF
+	chainloader ${EFIPATH}
+}
+EOF
+    ;;
     linux)
       if [ "x$BTRFS" = "xbtrfs" ]; then
          LINUXPROBED="`linux-boot-prober btrfs ${BTRFSuuid} ${BTRFSsubvol}  2> /dev/null | tr ' ' '^' | paste -s -d ' '`"