0002-Revert-templates-Properly-disable-the-os-prober-by-d.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Javier Martinez Canillas <javierm@redhat.com>
  3. Date: Fri, 11 Jun 2021 12:10:54 +0200
  4. Subject: [PATCH] Revert "templates: Properly disable the os-prober by default"
  5. This reverts commit 54e0a1bbf1e9106901a557195bb35e5e20fb3925.
  6. ---
  7. util/grub-mkconfig.in | 5 +----
  8. util/grub.d/30_os-prober.in | 8 ++++----
  9. 2 files changed, 5 insertions(+), 8 deletions(-)
  10. diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
  11. index f8cbb8d7a2b..d3e879b8e5c 100644
  12. --- a/util/grub-mkconfig.in
  13. +++ b/util/grub-mkconfig.in
  14. @@ -140,9 +140,6 @@ GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2
  15. GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
  16. GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
  17. -# Disable os-prober by default due to security reasons.
  18. -GRUB_DISABLE_OS_PROBER="true"
  19. -
  20. # Filesystem for the device containing our userland. Used for stuff like
  21. # choosing Hurd filesystem module.
  22. GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
  23. @@ -204,7 +201,6 @@ export GRUB_DEVICE \
  24. GRUB_DEVICE_PARTUUID \
  25. GRUB_DEVICE_BOOT \
  26. GRUB_DEVICE_BOOT_UUID \
  27. - GRUB_DISABLE_OS_PROBER \
  28. GRUB_FS \
  29. GRUB_FONT \
  30. GRUB_PRELOAD_MODULES \
  31. @@ -246,6 +242,7 @@ export GRUB_DEFAULT \
  32. GRUB_BACKGROUND \
  33. GRUB_THEME \
  34. GRUB_GFXPAYLOAD_LINUX \
  35. + GRUB_DISABLE_OS_PROBER \
  36. GRUB_INIT_TUNE \
  37. GRUB_SAVEDEFAULT \
  38. GRUB_ENABLE_CRYPTODISK \
  39. diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
  40. index 94622481284..80685b15f4d 100644
  41. --- a/util/grub.d/30_os-prober.in
  42. +++ b/util/grub.d/30_os-prober.in
  43. @@ -26,8 +26,8 @@ export TEXTDOMAINDIR="@localedir@"
  44. . "$pkgdatadir/grub-mkconfig_lib"
  45. -if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
  46. - grub_warn "$(gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.")"
  47. +if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
  48. + gettext_printf "os-prober will not be executed to detect other bootable partitions.\nSystems on them will not be added to the GRUB boot configuration.\nCheck GRUB_DISABLE_OS_PROBER documentation entry.\n"
  49. exit 0
  50. fi
  51. @@ -36,12 +36,12 @@ if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/n
  52. exit 0
  53. fi
  54. -grub_warn "$(gettext_printf "os-prober will be executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
  55. -
  56. OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
  57. if [ -z "${OSPROBED}" ] ; then
  58. # empty os-prober output, nothing doing
  59. exit 0
  60. +else
  61. + grub_warn "$(gettext_printf "os-prober was executed to detect other bootable partitions.\nIt's output will be used to detect bootable binaries on them and create new boot entries.")"
  62. fi
  63. osx_entry() {