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}]
This commit is contained in:
Marta Lewandowska 2022-10-04 13:08:06 +00:00 committed by Robbie Harwood
parent c27471ab63
commit 585b6cb864
2 changed files with 11 additions and 8 deletions

View File

@ -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}" \

View File

@ -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 <rharwood@redhat.com> - 8.40-62
- Apply Marta's default args fix
- Resolves: #2127453
* Thu Aug 25 2022 Robbie Harwood <rharwood@redhat.com> - 8.40-61
- Sync args changes with 8.40-66.fc38
- Resolves: #1969362