Additionally write to /etc/kernel/cmdline (fedora sync)

Resolves: #1969362
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
Robbie Harwood 2022-06-02 19:59:34 +00:00
parent c48bfb1aeb
commit 929379d48a
2 changed files with 18 additions and 1 deletions

View File

@ -513,6 +513,19 @@ update_bls_fragment() {
opts="$(grub2-editenv "${env}" list | grep kernelopts | sed -e "s/kernelopts=//")" opts="$(grub2-editenv "${env}" list | grep kernelopts | sed -e "s/kernelopts=//")"
fi fi
# systemd decide that what we needed was *another* place to configure this
# stuff (after our two, plus BLS). Two, actually, but configuration
# doesn't live in /usr. If we don't do this, kernel-install
# (90-loaderentry.install) will read arguments from /proc/cmdline (instead
# of our actual configuration...), causing future kernel installs to use
# the current kernel's arguments - which depending on when the system
# reboots, may or may not be what the user wanted...
if [[ $param = "ALL" && -e /etc/default/grub ]]; then
opts="$(source /etc/default/grub; echo ${GRUB_CMDLINE_LINUX})"
root="$(tr -s "$IFS" '\n' </proc/cmdline | grep root= | tr -d '\n')"
echo "$root $opts" > /etc/kernel/cmdline
fi
for i in ${indexes[*]}; do for i in ${indexes[*]}; do
if [[ -n $remove_args || -n $add_args ]]; then if [[ -n $remove_args || -n $add_args ]]; then
local old_args="$(get_bls_args "$i")" local old_args="$(get_bls_args "$i")"

View File

@ -1,6 +1,6 @@
Name: grubby Name: grubby
Version: 8.40 Version: 8.40
Release: 55%{?dist} Release: 56%{?dist}
Summary: Command line tool for updating bootloader configs Summary: Command line tool for updating bootloader configs
License: GPLv2+ License: GPLv2+
URL: https://github.com/rhinstaller/grubby URL: https://github.com/rhinstaller/grubby
@ -131,6 +131,10 @@ current boot environment.
%{_mandir}/man8/*.8* %{_mandir}/man8/*.8*
%changelog %changelog
* Thu Jun 02 2022 Robbie Harwood <rharwood@redhat.com> - 8.40-56
- Additionally write to /etc/kernel/cmdline (fedora sync)
- Resolves: #1969362
* Mon Feb 07 2022 Robbie Harwood <rharwood@redhat.com> 8.40-55 * Mon Feb 07 2022 Robbie Harwood <rharwood@redhat.com> 8.40-55
- Sync grubby-bls with Fedora - Sync grubby-bls with Fedora
- Resolves: #1949904 - Resolves: #1949904