public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jeremy Linton <jlinton@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/sdubby] epel10: Add default-kernel option to match grubby
Date: Tue, 07 Jul 2026 07:20:17 GMT	[thread overview]
Message-ID: <178340881766.1.15426820835673564560.rpms-sdubby-b238ed07bcbf@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/sdubby
            Branch : epel10
            Commit : b238ed07bcbf3e816ec80444c8330f2066b29efc
            Author : Jeremy Linton <jlinton@redhat.com>
            Date   : 2024-03-26T18:41:59-05:00
            Stats  : +7/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/sdubby/c/b238ed07bcbf3e816ec80444c8330f2066b29efc?branch=epel10

            Log:
            Add default-kernel option to match grubby

Signed-off-by: Jeremy Linton <jlinton@redhat.com>

---
diff --git a/updateloaderentries.sh b/updateloaderentries.sh
index bc59c83..df08d57 100755
--- a/updateloaderentries.sh
+++ b/updateloaderentries.sh
@@ -58,7 +58,7 @@ if [[ "$progname" == "updateloaderentries" ]]; then
 fi
 
 
-OPTS="$(getopt -o hc:i:b:? --long help,args:,info:,update-kernel:,remove-args: -- "$@")"
+OPTS="$(getopt -o hc:i:b:? --long help,args:,info:,update-kernel:,remove-args:,default-kernel -- "$@")"
 
 eval set -- "$OPTS"
 
@@ -86,6 +86,9 @@ while [ ${#} -gt 0 ]; do
 	    info_kernel="$2"
 	    shift 1
 	    ;;
+	--default-kernel)
+	    utilmode="defaultkernel"
+	    ;;
     esac
     shift
 done
@@ -116,6 +119,9 @@ case "$utilmode" in
 	   bootctl list | grep -B7 -A2 ".*linux:.*$info_kernel" | awk "$CAPTUREROOT" | eval "${BOOTCTL_REMOVE_UNUSED}" | eval "${BOOTCTL_TO_GRUBBY_INFO}" | eval "${BOOTCTL_QUOTING}"
 	fi
 	;;
+    defaultkernel)
+	bootctl list |grep -A6 ".*title:.*(default)" | grep "linux:" | cut -c16-
+	;;
     merge)
 	for i in /boot/efi/loader/entries/*; do
 	    if [[ -f "$i" ]]; then

                 reply	other threads:[~2026-07-07  7:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178340881766.1.15426820835673564560.rpms-sdubby-b238ed07bcbf@fedoraproject.org \
    --to=jlinton@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox