[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG
From: |
Michael Chang |
Subject: |
[PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG |
Date: |
Mon, 15 Jul 2019 09:28:31 +0000 |
This patch adds support to disable os-prober debug output while running
grub-mkconfig through GRUB_OS_PROBER_DISABLE_DEBUG=true in simple
configuration interface. The os-prober needs to support the
OS_PROBER_DISABLE_DEBUG environment variable, which was introduced by
1.72 release.
Signed-off-by: Michael Chang <address@hidden>
---
docs/grub.texi | 4 ++++
util/grub-mkconfig.in | 3 ++-
util/grub.d/30_os-prober.in | 4 ++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/docs/grub.texi b/docs/grub.texi
index 3d50b16ba..0295d1e67 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -1490,6 +1490,10 @@ for them. Set this option to @samp{true} to disable
this.
List of space-separated FS UUIDs of filesystems to be ignored from os-prober
output. For efi chainloaders it's <UUID>@@<EFI FILE>
+@item GRUB_OS_PROBER_DISABLE_DEBUG
+Set to @samp{true} to disable @command{os-prober} program's debug output while
+running the @command{grub-mkconfig}.
+
@item GRUB_DISABLE_SUBMENU
Normally, @command{grub-mkconfig} will generate top level menu entry for
the kernel with highest version number and put all other found kernels
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 9f477ff05..80e8a9d62 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -238,7 +238,8 @@ export GRUB_DEFAULT \
GRUB_ENABLE_CRYPTODISK \
GRUB_BADRAM \
GRUB_OS_PROBER_SKIP_LIST \
- GRUB_DISABLE_SUBMENU
+ GRUB_DISABLE_SUBMENU \
+ GRUB_OS_PROBER_DISABLE_DEBUG
if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new"
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 515a68c7a..b182b5842 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -30,6 +30,10 @@ if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
exit 0
fi
+if [ "x${GRUB_OS_PROBER_DISABLE_DEBUG}" = "xtrue" ]; then
+ export OS_PROBER_DISABLE_DEBUG=y
+fi
+
if [ -z "`which os-prober 2> /dev/null`" ] || [ -z "`which linux-boot-prober
2> /dev/null`" ] ; then
# missing os-prober and/or linux-boot-prober
exit 0
--
2.16.4
- [PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG,
Michael Chang <=