Date: Wed, 24 Oct 2018 02:02:37 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339677 - head/stand/lua Message-ID: <201810240202.w9O22bsR020100@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Oct 24 02:02:37 2018 New Revision: 339677 URL: https://svnweb.freebsd.org/changeset/base/339677 Log: lualoader: unload upon kernel change if a kernel was previously loaded In the majority of cases, a kernel is not loaded before we hit the menu. However, if a password is set, we'll trigger autoboot and have loadelf'd beforehand. We also need to take into account one dropping to the loader prompt and twiddling with things manually; if they try to toggle through kernels, we'll assume they mean it. Reported by: trasz MFC after: 3 days Modified: head/stand/lua/menu.lua Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Wed Oct 24 00:19:44 2018 (r339676) +++ head/stand/lua/menu.lua Wed Oct 24 02:02:37 2018 (r339677) @@ -312,6 +312,9 @@ menu.welcome = { #all_choices .. ")" end, func = function(_, choice, _) + if loader.getenv("kernelname") ~= nil then + loader.perform("unload") + end config.selectKernel(choice) end, alias = {"k", "K"},
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810240202.w9O22bsR020100>