Compare commits

...

2 Commits

Author SHA1 Message Date
Marta Lewandowska a191473478 Don't overwrite vars that start with GRUB_CMDLINE_LINUX 2024-01-12 02:07:45 +00:00
Marta Lewandowska c2d08566dd Do not set root with not copying default 2023-02-21 19:33:02 +01:00
3 changed files with 20 additions and 8 deletions

1
.grubby.metadata Normal file
View File

@ -0,0 +1 @@
97ae8d113b74538c05f05083dcff4f44012fd0cd 8.40-1.tar.gz

View File

@ -500,7 +500,7 @@ update_bls_fragment() {
if [[ -n $old_args ]]; then
opts="$(update_args "${old_args}" "${remove_args}" "${add_args}")"
opts="$(echo "$opts" | sed -e 's/\//\\\//g')"
sed -i -e "s/^GRUB_CMDLINE_LINUX.*/GRUB_CMDLINE_LINUX=\\\"${opts}\\\"/" "${grub_etc_default}"
sed -i -e "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\\\"${opts}\\\"/" "${grub_etc_default}"
fi
fi
@ -827,12 +827,15 @@ fi
remove_var_prefix "$(get_prefix)"
if [[ -n $kernel ]]; then
opts="${bls_options[$default_index]}"
if [[ $copy_default != "true" ]]; then
opts=$(echo $opts | sed -e 's/ .*//')
fi
if [[ -n $args ]]; then
opts="${opts} ${args}"
if [[ $copy_default = "true" ]]; then
opts="${bls_options[$default_index]}"
if [[ -n $args ]]; then
opts="${opts} ${args}"
fi
else
opts="${opts} ${args}"
remove_args="$kernelopts"
update_args "${opts}" "${remove_args}" ""
fi
add_bls_fragment "${kernel}" "${title}" "${opts}" "${initrd}" \

View File

@ -1,6 +1,6 @@
Name: grubby
Version: 8.40
Release: 62%{?dist}
Release: 64%{?dist}
Summary: Command line tool for updating bootloader configs
License: GPLv2+
URL: https://github.com/rhinstaller/grubby
@ -131,6 +131,14 @@ current boot environment.
%{_mandir}/man8/*.8*
%changelog
* Wed Jan 10 2024 Marta Lewandowska <mlewando@redhat.com> - 8.40-64
- Do not overwrite all vars that start with GRUB_CMDLINE_LINUX
- Resolves: #RHEL-21301
* Tue Feb 21 2023 Marta Lewandowska <mlewando@redhat.com> - 8.40-63
- remove root= when not copying default
- Resolves: #2127453
* Wed Feb 15 2022 Robbie Harwood <rharwood@redhat.com> - 8.40-62
- Apply Marta's default args fix
- Resolves: #2127453