30_os-prober.in: only warn if os-prober is available
PATCH 1/1 30_os-prober.in: only warn if os-prober is available
From: Christoph Anton Mitterer <[email protected]>
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 <[email protected]>
Signed-off-by Sertonix <[email protected]>
---
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(-)
util/grub.d/30_os-prober.in +4 -5
@@ -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 ' '`"
Signature · 7 lines
2.44.0 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel