From 1c226c8702929ebe98e5f1e72414e413aa1e391b Mon Sep 17 00:00:00 2001 From: Marta Lewandowska Date: Fri, 9 Jun 2023 16:24:35 +0200 Subject: [PATCH] Fix passing --args without copy-default Fix so that --args are not passed by default if copy-default is not used. Set root when --args are passed without copy-default. Resolves: #1900829 Signed-off-by: Marta Lewandowska Signed-off-by: Nicolas Frayer --- grubby-bls | 4 +++- grubby.spec | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/grubby-bls b/grubby-bls index 360c6e8..f5b9735 100755 --- a/grubby-bls +++ b/grubby-bls @@ -812,7 +812,9 @@ if [[ -n $kernel ]]; then opts="${opts} ${args}" fi else - opts="${args}" + opts="${opts} ${args}" + remove_args="$kernelopts" + update_args "${opts}" "${remove_args}" "" fi add_bls_fragment "${kernel}" "${title}" "${opts}" "${initrd}" \ diff --git a/grubby.spec b/grubby.spec index e8aef0e..1e9ae63 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 47%{?dist} +Release: 48%{?dist} Summary: Command line tool for updating BootLoaderSpec files License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -169,6 +169,10 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Tue Feb 21 2023 Marta Lewandowska - 8.40-48 +- Apply Marta's default args fix +- Resolves: #1900829 + * Mon Oct 10 2022 Robbie Harwood - 8.40-47 - Backport fedora/rhel9 initial cmdline population - Resolves: #2129740