menu.lua (bb4c691299c5d699cea29e18fef96bda1cef13da) | menu.lua (9b17aa27406f3716383e71c6687d53599a8f8d8a) |
---|---|
1-- 2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3-- 4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org> 5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6-- All rights reserved. 7-- 8-- Redistribution and use in source and binary forms, with or without --- 46 unchanged lines hidden (view full) --- 55end 56 57local function bootenvSet(env) 58 loader.setenv("vfs.root.mountfrom", env) 59 loader.setenv("currdev", env .. ":") 60 config.reload() 61end 62 | 1-- 2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3-- 4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org> 5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6-- All rights reserved. 7-- 8-- Redistribution and use in source and binary forms, with or without --- 46 unchanged lines hidden (view full) --- 55end 56 57local function bootenvSet(env) 58 loader.setenv("vfs.root.mountfrom", env) 59 loader.setenv("currdev", env .. ":") 60 config.reload() 61end 62 |
63local function multiUserPrompt() 64 return loader.getenv("loader_menu_multi_user_prompt") or "Multi user" 65end 66 |
|
63-- Module exports 64menu.handlers = { 65 -- Menu handlers take the current menu and selected entry as parameters, 66 -- and should return a boolean indicating whether execution should 67 -- continue or not. The return value may be omitted if this entry should 68 -- have no bearing on whether we continue or not, indicating that we 69 -- should just continue after execution. 70 [core.MENU_ENTRY] = function(_, entry) --- 187 unchanged lines hidden (view full) --- 258 menu_entries.boot_envs, 259 menu_entries.chainload, 260 menu_entries.vendor, 261 } 262 end, 263 all_entries = { 264 multi_user = { 265 entry_type = core.MENU_ENTRY, | 67-- Module exports 68menu.handlers = { 69 -- Menu handlers take the current menu and selected entry as parameters, 70 -- and should return a boolean indicating whether execution should 71 -- continue or not. The return value may be omitted if this entry should 72 -- have no bearing on whether we continue or not, indicating that we 73 -- should just continue after execution. 74 [core.MENU_ENTRY] = function(_, entry) --- 187 unchanged lines hidden (view full) --- 262 menu_entries.boot_envs, 263 menu_entries.chainload, 264 menu_entries.vendor, 265 } 266 end, 267 all_entries = { 268 multi_user = { 269 entry_type = core.MENU_ENTRY, |
266 name = color.highlight("B") .. "oot Multi user " .. 267 color.highlight("[Enter]"), | 270 name = function() 271 return color.highlight("B") .. "oot " .. 272 multiUserPrompt() .. " " .. 273 color.highlight("[Enter]") 274 end, |
268 -- Not a standard menu entry function! | 275 -- Not a standard menu entry function! |
269 alternate_name = color.highlight("B") .. 270 "oot Multi user", | 276 alternate_name = function() 277 return color.highlight("B") .. "oot " .. 278 multiUserPrompt() 279 end, |
271 func = function() 272 core.setSingleUser(false) 273 core.boot() 274 end, 275 alias = {"b", "B"}, 276 }, 277 single_user = { 278 entry_type = core.MENU_ENTRY, --- 276 unchanged lines hidden --- | 280 func = function() 281 core.setSingleUser(false) 282 core.boot() 283 end, 284 alias = {"b", "B"}, 285 }, 286 single_user = { 287 entry_type = core.MENU_ENTRY, --- 276 unchanged lines hidden --- |