20microsoft 616 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. # Detects Microsoft bootloader on a EFI System Partition
  3. . /usr/share/os-prober/common.sh
  4. efi="$1"
  5. found=
  6. for microsoft in $(item_in_dir microsoft "$efi"); do
  7. for boot in $(item_in_dir boot "$efi/$microsoft"); do
  8. bcd=$(item_in_dir bcd "$efi/$microsoft/$boot")
  9. bootmgfw=$(item_in_dir bootmgfw.efi "$efi/$microsoft/$boot")
  10. if [ -n "$bcd" -a -n "$bootmgfw" ]; then
  11. long="Windows Boot Manager"
  12. short=Windows
  13. path="$microsoft/$boot/$bootmgfw"
  14. found=true
  15. break
  16. fi
  17. done
  18. done
  19. if [ -n "$found" ]; then
  20. label="$(count_next_label "$short")"
  21. result "${path}:${long}:${label}"
  22. fi
  23. exit 0