nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0285-BLS-create-etc-kernel-cmdline-during-mkconfig.patch

d3c3ab
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d3c3ab
From: Robbie Harwood <rharwood@redhat.com>
d3c3ab
Date: Tue, 2 Aug 2022 15:56:28 -0400
d3c3ab
Subject: [PATCH] BLS: create /etc/kernel/cmdline during mkconfig
d3c3ab
d3c3ab
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
d3c3ab
(cherry picked from commit 0837dcdf17ac0429bafa4dbf063b2a94385c04ca)
d3c3ab
---
d3c3ab
 util/grub.d/10_linux.in | 6 ++++++
d3c3ab
 1 file changed, 6 insertions(+)
d3c3ab
d3c3ab
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
d3c3ab
index 6ee0a2cf3d..ec529eb814 100644
d3c3ab
--- a/util/grub.d/10_linux.in
d3c3ab
+++ b/util/grub.d/10_linux.in
d3c3ab
@@ -166,6 +166,12 @@ update_bls_cmdline()
d3c3ab
     local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
d3c3ab
     local -a files=($(get_sorted_bls))
d3c3ab
 
d3c3ab
+    if [[ ! -f /etc/kernel/cmdline ]]; then
d3c3ab
+	# anaconda has the correct information to do this during install;
d3c3ab
+	# afterward, grubby will take care of syncing on updates.
d3c3ab
+	echo "$cmdline rhgb quiet" > /etc/kernel/cmdline
d3c3ab
+    fi
d3c3ab
+
d3c3ab
     for bls in "${files[@]}"; do
d3c3ab
         local options="${cmdline}"
d3c3ab
         if [ -z "${bls##*debug*}" ]; then