public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/sdubby] epel10.2: grubby: compatiblity with --update-kernel=ALL
@ 2026-07-07 7:20 Jeremy Linton
0 siblings, 0 replies; only message in thread
From: Jeremy Linton @ 2026-07-07 7:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/sdubby
Branch : epel10.2
Commit : 99971e1c56c8441cf85c1ee35dcdf29d9b1e91b3
Author : Jeremy Linton <jlinton@redhat.com>
Date : 2024-08-26T18:39:31-05:00
Stats : +11/-9 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/sdubby/c/99971e1c56c8441cf85c1ee35dcdf29d9b1e91b3?branch=epel10.2
Log:
grubby: compatiblity with --update-kernel=ALL
grubby has a wildcard option ALL for which kernels have an option
added/removed. sdubby can do this without specifying ALL
but for compatiliby (and to fix a bug with add) we should probably
tweak it a bit.
Signed-off-by: Jeremy Linton <jlinton@redhat.com>
---
diff --git a/updateloaderentries.sh b/updateloaderentries.sh
index df08d57..e19a094 100755
--- a/updateloaderentries.sh
+++ b/updateloaderentries.sh
@@ -93,6 +93,10 @@ while [ ${#} -gt 0 ]; do
shift
done
+if [[ "$info_kernel" == "ALL" ]]; then
+ unset info_kernel
+fi
+
case "$utilmode" in
help)
echo "updateloaderentries.sh: When run as updateloaderentries it doesn't require any parameters and merges"
@@ -107,17 +111,15 @@ case "$utilmode" in
;;
add)
config_file=`bootctl list |grep -B7 -A2 ".*linux:.*${info_kernel}"|grep "^.*source:" |cut -d: -f2- `
- grep ${modify_args} $config_file
- if [[ "$?" == "1" ]]; then
- sed -i -e "s/^options /options ${modify_args} /" $config_file
- fi
+ for fn in $config_file; do
+ grep ${modify_args} $fn >/dev/null
+ if [[ "$?" == "1" ]]; then
+ sed -i -e "s/^options /options ${modify_args} /" $fn
+ fi
+ done
;;
info)
- if [[ "$info_kernel" == "ALL" ]];then
- bootctl list | grep -B7 -A2 "linux:" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
- else
- bootctl list | grep -B7 -A2 ".*linux:.*$info_kernel" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
- fi
+ bootctl list | grep -B7 -A2 ".*linux:.*$info_kernel" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
;;
defaultkernel)
bootctl list |grep -A6 ".*title:.*(default)" | grep "linux:" | cut -c16-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-07 7:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-07 7:20 [rpms/sdubby] epel10.2: grubby: compatiblity with --update-kernel=ALL Jeremy Linton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox