[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] 30_os-prober.in: only warn if os-prober is available
From: |
Sertonix |
Subject: |
[PATCH] 30_os-prober.in: only warn if os-prober is available |
Date: |
Thu, 18 Apr 2024 21:33:36 +0000 |
From: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
It doesn’t make sense to warn that os-prober is not going to be executed when
that isn’t available anyway.
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Signed-off-by: Sertonix <sertonix@posteo.net>
---
The initial patch was attached in this bug report:
https://savannah.gnu.org/bugs/index.php?61718
I simplified it slightly.
util/grub.d/30_os-prober.in | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 656301eaf..f3c682da8 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -26,16 +26,15 @@ export TEXTDOMAINDIR="@localedir@"
. "$pkgdatadir/grub-mkconfig_lib"
-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
-
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 [ "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
grub_warn "$(gettext_printf "os-prober will be executed to detect other
bootable partitions.\nIts output will be used to detect bootable binaries on
them and create new boot entries.")"
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
--
2.44.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] 30_os-prober.in: only warn if os-prober is available,
Sertonix <=