lualoader: Don't autodetect kernels if 'kernels' is explicitly set
This commit is contained in:
parent
8404ad78db
commit
3f4eb56bde
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329709
@ -188,7 +188,7 @@ end
|
||||
|
||||
function core.kernelList()
|
||||
local k = loader.getenv("kernel")
|
||||
local v = loader.getenv("kernels") or ""
|
||||
local v = loader.getenv("kernels")
|
||||
|
||||
local kernels = {}
|
||||
local unique = {}
|
||||
@ -199,6 +199,7 @@ function core.kernelList()
|
||||
unique[k] = true
|
||||
end
|
||||
|
||||
if v ~= nil then
|
||||
for n in v:gmatch("([^; ]+)[; ]?") do
|
||||
if unique[n] == nil then
|
||||
i = i + 1
|
||||
@ -207,6 +208,11 @@ function core.kernelList()
|
||||
end
|
||||
end
|
||||
|
||||
-- We will not automatically detect kernels to be displayed if
|
||||
-- loader.conf(5) explicitly set 'kernels'.
|
||||
return kernels
|
||||
end
|
||||
|
||||
-- Automatically detect other bootable kernel directories using a
|
||||
-- heuristic. Any directory in /boot that contains an ordinary file
|
||||
-- named "kernel" is considered eligible.
|
||||
|
Loading…
Reference in New Issue
Block a user