Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 2023 16:54:42 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 272077] loader defaults to kernel=kernel even if it doesn't exist
Message-ID:  <bug-272077-227-9w7sWtBE8V@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-272077-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272077

Dag-Erling Smørgrav <des@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |des@FreeBSD.org

--- Comment #2 from Dag-Erling Smørgrav <des@FreeBSD.org> ---
My suggestion would be:

- if able to enumerate kernels
  - initialize the list of kernels to the enumerated kernels in lexical order
- if the list of kernels is empty after attempted enumeration
  - initialize it to getenv("kernels"):gmatch("([^;, ]+)[;, ]?")
- if the list of kernels is still empty
  - initialize the list to getenv("kernel")
- else
  - if getenv("kernel") is in the list
    - move it to the front of the list

I believe this will result in the least disruption for existing setups while
removing the annoying behavior of always trying to load a non-existent kernel
for users who have KODIR = /boot/${KERN_IDENT} in /etc/src.conf.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-272077-227-9w7sWtBE8V>