diff options
Diffstat (limited to 'client/shared/lib/os-probes')
-rwxr-xr-x | client/shared/lib/os-probes/mounted/efi/31part-x-y | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/client/shared/lib/os-probes/mounted/efi/31part-x-y b/client/shared/lib/os-probes/mounted/efi/31part-x-y new file mode 100755 index 00000000..349c36d8 --- /dev/null +++ b/client/shared/lib/os-probes/mounted/efi/31part-x-y @@ -0,0 +1,28 @@ +#!/bin/sh +# OG: Detects Microsoft bootloader on a EFI System Partition in directory Part-xx-yy (#802 #888) + +. /usr/share/os-prober/common.sh + +efi="$1" + +found= +for microsoft in $(item_in_dir Part-..-.. "$efi"); do + for boot in $(item_in_dir boot "$efi/$microsoft"); do + bcd=$(item_in_dir bcd "$efi/$microsoft/$boot") + bootmgfw=$(item_in_dir bootmgfw.efi "$efi/$microsoft/$boot") + if [ -n "$bcd" -a -n "$bootmgfw" ]; then + long="Windows Boot Manager" + short=Windows + path="$microsoft/$boot/$bootmgfw" + found=true + break + fi + done +done + + +if [ -n "$found" ]; then + label="$(count_next_label "$short")" + result "${path}:${long}:${label}" +fi +exit 0 |