diff options
| author | Cyrus Rahman <crahman@gmail.com> | 2023-04-16 02:27:53 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2023-04-16 02:39:52 +0000 |
| commit | d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c (patch) | |
| tree | 2da5d743596fc3c4c7e09f052c5ec157dee7aa49 | |
| parent | 214909d6698da52cb8a2c4c0c591264aeb58b4c0 (diff) | |
| download | src-d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c.tar.gz src-d7584aa09fcf8d96544e5bfb3ea78f50d7720c0c.zip | |
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
| -rw-r--r-- | stand/lua/menu.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 400dbf3d469b..4a326cb54bb9 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -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() |
