Package: grub-common
Version: 2.06-4
Severity: minor
Tags: patch

Dear grub maintainer,

I've been somewhat bothered by the warning about os-prober:

    Warning: os-prober will not be executed to detect other bootable partitions.
    Systems on them will not be added to the GRUB boot configuration.
    Check GRUB_DISABLE_OS_PROBER documentation entry.

I appreciate the security issue, however this system never ever had
os-prober installed in it...


Looking at the 30_os-prober script, I notice that it first checks for
the GRUB_DISABLE_OS_PROBER variable and only later actually check if
os-prober is even available.  I think this should be switched, so that
if os-prober is not even there the warning dosn't go off.

I'm attaching a patch, I'll let you forward it to upstream however they
like it, or incorporate it as a local patch... (or just diregard me :P)

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 225a3baf7..ea3f3f804 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -40,13 +40,13 @@ EOF
   fi
 }
 
-if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
-  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.")"
+if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/null ; then
+  # missing os-prober and/or linux-boot-prober
   exit 0
 fi
 
-if ! command -v os-prober > /dev/null || ! command -v linux-boot-prober > /dev/null ; then
-  # missing os-prober and/or linux-boot-prober
+if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
+  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.")"
   exit 0
 fi
 

Attachment: signature.asc
Description: PGP signature

Reply via email to