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

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