|
|
fd0330 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
fd0330 |
From: Robbie Harwood <rharwood@redhat.com>
|
|
|
fd0330 |
Date: Wed, 17 Aug 2022 10:26:07 -0400
|
|
|
fd0330 |
Subject: [PATCH] squish: don't dup rhgb quiet, check mtimes
|
|
|
fd0330 |
|
|
|
fd0330 |
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
|
|
fd0330 |
---
|
|
|
fd0330 |
util/grub.d/10_linux.in | 14 ++++++++++----
|
|
|
fd0330 |
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
|
fd0330 |
|
|
|
fd0330 |
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
|
|
|
fd0330 |
index 9ebff661a9..41c6cb1dc2 100644
|
|
|
fd0330 |
--- a/util/grub.d/10_linux.in
|
|
|
fd0330 |
+++ b/util/grub.d/10_linux.in
|
|
|
fd0330 |
@@ -161,10 +161,16 @@ update_bls_cmdline()
|
|
|
fd0330 |
local cmdline="root=${LINUX_ROOT_DEVICE} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
|
|
fd0330 |
local -a files=($(get_sorted_bls))
|
|
|
fd0330 |
|
|
|
fd0330 |
- if [[ ! -f /etc/kernel/cmdline ]]; then
|
|
|
fd0330 |
- # anaconda has the correct information to do this during install;
|
|
|
fd0330 |
- # afterward, grubby will take care of syncing on updates.
|
|
|
fd0330 |
- echo "$cmdline rhgb quiet" > /etc/kernel/cmdline
|
|
|
fd0330 |
+ if [[ ! -f /etc/kernel/cmdline ]] ||
|
|
|
fd0330 |
+ [[ /etc/kernel/cmdline -ot /etc/default/grub ]]; then
|
|
|
fd0330 |
+ # anaconda has the correct information to create this during install;
|
|
|
fd0330 |
+ # afterward, grubby will take care of syncing on updates. If the user
|
|
|
fd0330 |
+ # has modified /etc/default/grub, try to cope.
|
|
|
fd0330 |
+ if [[ ! "$cmdline" =~ "rhgb quiet" ]]; then
|
|
|
fd0330 |
+ # ensure these only show up once
|
|
|
fd0330 |
+ cmdline="$cmdline rhgb quiet"
|
|
|
fd0330 |
+ fi
|
|
|
fd0330 |
+ echo "$cmdline" > /etc/kernel/cmdline
|
|
|
fd0330 |
fi
|
|
|
fd0330 |
|
|
|
fd0330 |
for bls in "${files[@]}"; do
|