Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions pkg/lib/kernelopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ error() {
grub() {
key="${2%=*}" # split off optional =value

# For the non-BLS case, or if someone overrides those with grub2-mkconfig
# or update-grub, change it in /etc/default/grub
# For the non-BLS case, or if someone overrides those with grub2-mkconfig,
# update-grub or update-bootloader, change it in /etc/default/grub
if [ -e /etc/default/grub ]; then
if [ "$1" = set ]; then
# replace existing argument, otherwise append it
Expand All @@ -38,6 +38,11 @@ grub() {
elif [ -e /etc/default/grub ] && type update-grub >/dev/null 2>&1; then
update-grub

# on Suse platforms, use update-bootloader
# Since earlier we updated /etc/default/grub we can just run update-bootloader
elif type update-bootloader >/dev/null 2>&1; then
update-bootloader

# on OSTree, the kernel config is inside the image
elif cur=$(rpm-ostree kargs 2>&1); then
if [ "$1" = set ]; then
Expand All @@ -51,7 +56,7 @@ grub() {
rpm-ostree kargs --delete="$key"
fi
else
error "No supported grub update mechanism found (grubby, update-grub, or rpm-ostree)"
error "No supported grub update mechanism found (grubby, update-grub, update-bootloader or rpm-ostree)"
fi
}

Expand Down