os-prober/os-prober-05efi-udevinfo.patch
Michael Chang 4c3a7a939d Accepting request 571598 from home:michael-chang:branches:Base:System
- Fix Windows not listed in grub menu after install or upgrade (bsc#1076779)
  * os-prober-05efi-udevinfo.patch

OBS-URL: https://build.opensuse.org/request/show/571598
OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=77
2018-02-02 04:48:56 +00:00

33 lines
1.5 KiB
Diff

Index: os-prober/os-probes/mounted/x86/05efi
===================================================================
--- os-prober.orig/os-probes/mounted/x86/05efi
+++ os-prober/os-probes/mounted/x86/05efi
@@ -28,7 +28,7 @@ if type udevadm > /dev/null 2>&1; then
fi
if type udevinfo > /dev/null 2>&1; then
- eval "$(udevinfo -q property -n "$partition" | grep -E '^(MD_CONTAINER|ID_PART_ENTRY_(TYPE|SCHEME))=')"
+ eval "$(udevinfo -q property -n "$partition" | sed -n -e 's/\(.*\)=\(.*\)/\1="\2"/p' | grep -E '^(MD_CONTAINER|ID_PART_ENTRY_(TYPE|SCHEME)|PARTNAME)=')"
debug "$partition container is '$MD_CONTAINER'"
# Skip virtual devices unless they are known SW-RAID
@@ -48,13 +48,16 @@ if type udevinfo > /dev/null 2>&1; then
debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME"
debug "$partition partition type is $ID_PART_ENTRY_TYPE"
+ debug "$partition partition name is $PARTNAME"
if [ -z "$ID_PART_ENTRY_TYPE" -o -z "$ID_PART_ENTRY_SCHEME" -o \
\( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != dos \) -o \
\( "$ID_PART_ENTRY_SCHEME" = gpt -a "$ID_PART_ENTRY_TYPE" != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \
\( "$ID_PART_ENTRY_SCHEME" = dos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then
- debug "$partition is not a ESP partition: exiting"
- exit 1
+ if [ -z "$PARTNAME" -o "$PARTNAME" != "EFI system partition" ]; then
+ debug "$partition is not a ESP partition: exiting"
+ exit 1
+ fi
fi
else
debug "udevinfo and udevadm missing - cannot check partition type"