os-prober-efi-shell.patch 708 B

12345678910111213141516171819202122232425262728293031
  1. diff --git a/os-probes/mounted/common/efi/05shell b/os-probes/mounted/common/efi/05shell
  2. new file mode 100644
  3. index 0000000..d4233c0
  4. --- /dev/null
  5. +++ b/os-probes/mounted/common/efi/05shell
  6. @@ -0,0 +1,24 @@
  7. +#!/usr/bin/sh
  8. +# Detects a shell.efi bootloader on a EFI System Partition
  9. +
  10. +. /usr/share/os-prober/common.sh
  11. +
  12. +found=
  13. +
  14. +efi_shell=`find $1 -iname "shell.efi"`
  15. +if [ -n "${efi_shell}" ]; then
  16. + bdir="${efi_shell%/*}"
  17. + bdir="${efi_shell##*/}"
  18. + filename=`basename ${efi_shell}`
  19. + long="EFI firmware management shell"
  20. + short="EFI_SHELL"
  21. + path=${bdir}/${filename}
  22. + found=true
  23. +fi
  24. +
  25. +if [ -n "$found" ]; then
  26. + label="$(count_next_label "$short")"
  27. + result "${path}:${long}:${label}"
  28. +fi
  29. +
  30. +exit 0