Blame SOURCES/0002-Revert-templates-Properly-disable-the-os-prober-by-d.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Javier Martinez Canillas <javierm@redhat.com>
5593c8
Date: Fri, 11 Jun 2021 12:10:54 +0200
5593c8
Subject: [PATCH] Revert "templates: Properly disable the os-prober by default"
5593c8
5593c8
This reverts commit 54e0a1bbf1e9106901a557195bb35e5e20fb3925.
5593c8
---
5593c8
 util/grub-mkconfig.in       | 5 +----
5593c8
 util/grub.d/30_os-prober.in | 8 ++++----
5593c8
 2 files changed, 5 insertions(+), 8 deletions(-)
5593c8
5593c8
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
d3c3ab
index f8cbb8d7a2b..d3e879b8e5c 100644
5593c8
--- a/util/grub-mkconfig.in
5593c8
+++ b/util/grub-mkconfig.in
5593c8
@@ -140,9 +140,6 @@ GRUB_DEVICE_PARTUUID="`${grub_probe} --device ${GRUB_DEVICE} --target=partuuid 2
5593c8
 GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`"
5593c8
 GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true
5593c8
 
5593c8
-# Disable os-prober by default due to security reasons.
5593c8
-GRUB_DISABLE_OS_PROBER="true"
5593c8
-
5593c8
 # Filesystem for the device containing our userland.  Used for stuff like
5593c8
 # choosing Hurd filesystem module.
5593c8
 GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
5593c8
@@ -204,7 +201,6 @@ export GRUB_DEVICE \
5593c8
   GRUB_DEVICE_PARTUUID \
5593c8
   GRUB_DEVICE_BOOT \
5593c8
   GRUB_DEVICE_BOOT_UUID \
5593c8
-  GRUB_DISABLE_OS_PROBER \
5593c8
   GRUB_FS \
5593c8
   GRUB_FONT \
5593c8
   GRUB_PRELOAD_MODULES \
5593c8
@@ -246,6 +242,7 @@ export GRUB_DEFAULT \
5593c8
   GRUB_BACKGROUND \
5593c8
   GRUB_THEME \
5593c8
   GRUB_GFXPAYLOAD_LINUX \
5593c8
+  GRUB_DISABLE_OS_PROBER \
5593c8
   GRUB_INIT_TUNE \
5593c8
   GRUB_SAVEDEFAULT \
5593c8
   GRUB_ENABLE_CRYPTODISK \
5593c8
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
d3c3ab
index 94622481284..80685b15f4d 100644
5593c8
--- a/util/grub.d/30_os-prober.in
5593c8
+++ b/util/grub.d/30_os-prober.in
5593c8
@@ -26,8 +26,8 @@ export TEXTDOMAINDIR="@localedir@"
5593c8
 
5593c8
 . "$pkgdatadir/grub-mkconfig_lib"
5593c8
 
5593c8
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
5593c8
-  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.")"
5593c8
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xfalse" ]; then
5593c8
+  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"
5593c8
   exit 0
5593c8
 fi
5593c8
 
5593c8
@@ -36,12 +36,12 @@ if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/n
5593c8
   exit 0
5593c8
 fi
5593c8
 
5593c8
-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.")"
5593c8
-
5593c8
 OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
5593c8
 if [ -z "${OSPROBED}" ] ; then
5593c8
   # empty os-prober output, nothing doing
5593c8
   exit 0
5593c8
+else
5593c8
+  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.")"
5593c8
 fi
5593c8
 
5593c8
 osx_entry() {