public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/akmods] rawhide: Re-order bootctl and grubby to get default_kernel - rhbz#2501572
@ 2026-07-29 9:36 Nicolas Chauvet
0 siblings, 0 replies; only message in thread
From: Nicolas Chauvet @ 2026-07-29 9:36 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/akmods
Branch : rawhide
Commit : 80ff2542107f0d4550232b951244efcc4ee676f3
Author : Nicolas Chauvet <kwizart@gmail.com>
Date : 2026-07-20T14:52:15+02:00
Stats : +4/-4 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/akmods/c/80ff2542107f0d4550232b951244efcc4ee676f3?branch=rawhide
Log:
Re-order bootctl and grubby to get default_kernel - rhbz#2501572
---
diff --git a/akmods b/akmods
index 3891136..2899ff3 100755
--- a/akmods
+++ b/akmods
@@ -295,17 +295,17 @@ check_default_kernel()
# IMPORTANT: "bootctl is-installed" check that systemd-boot is installed only.
# It doesn't check if systemd-boot is the default loader.
# So we assume grubby results if available
- if command -v grubby >/dev/null 2>&1 ; then
- default_kernel=$(grubby --default-kernel | sed -e 's/^.*vmlinuz-//')
- elif bootctl is-installed >/dev/null 2>&1 ; then
+ if bootctl is-installed >/dev/null 2>&1 ; then
# Leave jq as optional - isDefault requires systemd 253
if command -v jq >/dev/null ; then
- default_kernel="$(bootctl list --json=short | jq -r '.[] | select(.isDefault).version')"
+ default_kernel="$(bootctl list --json=short 2>/dev/null |jq -r '.[] | select(.isDefault).version')"
# Validate the result or discard - rhbz#2270414
if [[ ! -f /boot/vmlinuz-"${default_kernel}" ]] ; then
default_kernel=""
fi
fi
+ elif command -v grubby >/dev/null 2>&1 ; then
+ default_kernel=$(grubby --default-kernel | sed -e 's/^.*vmlinuz-//')
else # They use neither systemd-boot nor grub2
echo -n "Unable to figure out the default kernel" >&2
echo_warning ; echo
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-29 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 9:36 [rpms/akmods] rawhide: Re-order bootctl and grubby to get default_kernel - rhbz#2501572 Nicolas Chauvet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox