loader: Add loader_autoboot_show
It's used to control if the autoboot part of loader is displayed or not. Differential Revision: https://reviews.freebsd.org/D49819 Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG
This commit is contained in:
@@ -410,6 +410,10 @@ be displayed.
|
||||
If set to
|
||||
.Dq YES ,
|
||||
the beastie boot menu will be skipped.
|
||||
.It Va loader_autoboot_show Pq Dq Li YES
|
||||
If set to
|
||||
.Dq NO ,
|
||||
the autoboot menu will not be displayed
|
||||
.It Va loader_logo Pq Dq Li orbbw
|
||||
Selects a desired logo in the beastie boot menu.
|
||||
Possible values are:
|
||||
|
||||
+7
-4
@@ -541,6 +541,7 @@ end
|
||||
function menu.autoboot(delay)
|
||||
local x = loader.getenv("loader_menu_timeout_x") or 4
|
||||
local y = loader.getenv("loader_menu_timeout_y") or 24
|
||||
local autoboot_show = loader.getenv("loader_autoboot_show") or "yes"
|
||||
local endtime = loader.time() + delay
|
||||
local time
|
||||
local last
|
||||
@@ -548,10 +549,12 @@ function menu.autoboot(delay)
|
||||
time = endtime - loader.time()
|
||||
if last == nil or last ~= time then
|
||||
last = time
|
||||
screen.setcursor(x, y)
|
||||
printc("Autoboot in " .. time ..
|
||||
" seconds. [Space] to pause ")
|
||||
screen.defcursor()
|
||||
if autoboot_show == "yes" then
|
||||
screen.setcursor(x, y)
|
||||
printc("Autoboot in " .. time ..
|
||||
" seconds. [Space] to pause ")
|
||||
screen.defcursor()
|
||||
end
|
||||
end
|
||||
if io.ischar() then
|
||||
local ch = io.getchar()
|
||||
|
||||
Reference in New Issue
Block a user