From: GRUB Maintainers Date: Mon, 19 Jun 2023 15:23:25 +0000 (+0200) Subject: Only show os-prober disable warning if installed X-Git-Tag: archive/raspbian/2.14_git20250718.0e36779-2+rpi1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0485402398160cbe956a0a1736dcfa44be61b4d3;p=grub2.git Only show os-prober disable warning if installed It isn't very useful to see this message when os-prober is not even available. Gbp-Pq: Name Only-show-os-prober-disable-warning-if-installed.patch --- diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in index b4885f8..ea9004b 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