From: Christoph Anton Mitterer <m...@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 <m...@christoph.anton.mitterer.name> Signed-off-by: Sertonix <serto...@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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel