mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
loader: lua: unload the kernel when changing BEs
Usually the kernel is loaded later, but there are circumstances where it could have been loaded earlier than changing BEs. Unload anything that is already there so that we know we're using artifacts from the proper environment. PR: 265471 Reviewed by: kevans MFC after: 3 days
This commit is contained in:
parent
214909d669
commit
d7584aa09f
|
@ -58,6 +58,9 @@ local function bootenvSet(env)
|
|||
loader.setenv("vfs.root.mountfrom", env)
|
||||
loader.setenv("currdev", env .. ":")
|
||||
config.reload()
|
||||
if loader.getenv("kernelname") ~= nil then
|
||||
loader.perform("unload")
|
||||
end
|
||||
end
|
||||
|
||||
local function multiUserPrompt()
|
||||
|
|
Loading…
Reference in a new issue