From 585b6cb864641913ce7ca847e9142255c14ef757 Mon Sep 17 00:00:00 2001 From: Marta Lewandowska Date: Tue, 4 Oct 2022 13:08:06 +0000 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: #2127453 [rharwood: bundle spec file bump because \rainbow{rhel process}] --- grubby-bls | 13 ++++++------- grubby.spec | 6 +++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/grubby-bls b/grubby-bls index f09156b..f3650e3 100755 --- a/grubby-bls +++ b/grubby-bls @@ -827,13 +827,12 @@ fi remove_var_prefix "$(get_prefix)" if [[ -n $kernel ]]; then - if [[ $copy_default = "true" ]]; then - opts="${bls_options[$default_index]}" - if [[ -n $args ]]; then - opts="${opts} ${args}" - fi - else - opts="${args}" + opts="${bls_options[$default_index]}" + if [[ $copy_default != "true" ]]; then + opts=$(echo $opts | sed -e 's/ .*//') + fi + if [[ -n $args ]]; then + opts="${opts} ${args}" fi add_bls_fragment "${kernel}" "${title}" "${opts}" "${initrd}" \ diff --git a/grubby.spec b/grubby.spec index a67dfde..309972d 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 61%{?dist} +Release: 62%{?dist} Summary: Command line tool for updating bootloader configs License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -131,6 +131,10 @@ current boot environment. %{_mandir}/man8/*.8* %changelog +* Wed Feb 15 2022 Robbie Harwood - 8.40-62 +- Apply Marta's default args fix +- Resolves: #2127453 + * Thu Aug 25 2022 Robbie Harwood - 8.40-61 - Sync args changes with 8.40-66.fc38 - Resolves: #1969362