File: grub_os-prober.patch

package info (click to toggle)
grub2 2.12-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-updates
  • size: 70,780 kB
  • sloc: ansic: 424,740; asm: 16,228; sh: 9,525; cpp: 2,095; makefile: 1,590; python: 1,468; sed: 431; lex: 393; yacc: 268; awk: 85; lisp: 54; perl: 31
file content (30 lines) | stat: -rw-r--r-- 1,287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: GRUB Maintainers <pkg-grub-devel@alioth-lists.debian.net>
Date: Mon, 19 Jun 2023 17:23:25 +0200
Subject: grub_os-prober

---
 util/grub.d/30_os-prober.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index c690783..62b259d 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