From 69e614eab8fc5d803b219ae90cac451f4a48b9b4 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Mon, 22 Aug 2022 21:47:49 +0000 Subject: [PATCH] Give up and just pull the config from BLS Suggested-by: Bojan Smojver Signed-off-by: Robbie Harwood --- grubby-bls | 12 +----------- grubby.spec | 6 +++++- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/grubby-bls b/grubby-bls index 0571a0b..f09156b 100755 --- a/grubby-bls +++ b/grubby-bls @@ -502,16 +502,6 @@ update_bls_fragment() { opts="$(echo "$opts" | sed -e 's/\//\\\//g')" sed -i -e "s/^GRUB_CMDLINE_LINUX.*/GRUB_CMDLINE_LINUX=\\\"${opts}\\\"/" "${grub_etc_default}" fi - - if [[ -f /etc/kernel/cmdline ]]; then - sed -i "s/\(root=[^ ]*\) .*/\1 ${opts}/" /etc/kernel/cmdline - else - # grub2-mkconfig creates this. Do that now. - grub2-mkconfig -o /etc/grub2.cfg - fi - if [[ ! -f /etc/kernel/cmdline ]]; then - echo "No /etc/kernel/cmdline; please report a bug"; - fi fi old_args="$(grub2-editenv "${env}" list | grep kernelopts | sed -e "s/kernelopts=//")" @@ -538,7 +528,7 @@ update_bls_fragment() { fi done - if [[ $param = "ALL" && $bootloader = zipl ]] && [[ -n $remove_args || -n $add_args ]]; then + if [[ $param = "ALL" ]] && [[ -n $remove_args || -n $add_args ]]; then if [[ ! -f /etc/kernel/cmdline ]]; then # anaconda could pre-populate this file, but until then, most of # the time we'll just want the most recent one. This is pretty diff --git a/grubby.spec b/grubby.spec index 6930b50..901735d 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 66%{?dist} +Release: 67%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -133,6 +133,10 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Mon Aug 22 2022 Robbie Harwood - 8.40-67 +- Give up and just pull the config from BLS +- Suggested-by: Bojan Smojver + * Thu Aug 18 2022 Robbie Harwood - 8.40-66 - Bring back -deprecated for fedora 36