stand/lua: Don't reload kernel config if we only have one kernel
Don't move this into config.reload because we may want to force reloads if /boot changes out from under us later. As a caution: changing kernels in lualoader at the moment might not be loading all of your modules (in my testing, at least) from loader.conf(5). This is a known problem.
This commit is contained in:
parent
aefcaa7e85
commit
84f82e468c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329415
@ -213,8 +213,10 @@ menu.welcome = {
|
||||
" (" .. idx ..
|
||||
" of " .. #all_choices .. ")";
|
||||
end,
|
||||
func = function(choice)
|
||||
func = function(choice, all_choices)
|
||||
if (#all_choices > 1) then
|
||||
config.reload(choice);
|
||||
end
|
||||
end,
|
||||
alias = {"k", "K"}
|
||||
},
|
||||
@ -300,7 +302,8 @@ function menu.run(m)
|
||||
if (#choices > 0) then
|
||||
caridx = (caridx % #choices) + 1;
|
||||
menu.setCarouselIndex(carid, caridx);
|
||||
sel_entry.func(choices[caridx]);
|
||||
sel_entry.func(choices[caridx],
|
||||
choices);
|
||||
end
|
||||
elseif (sel_entry.entry_type == core.MENU_SUBMENU) then
|
||||
-- recurse
|
||||
|
Loading…
Reference in New Issue
Block a user