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:
Emmanuel Vadot
2025-04-14 08:37:22 +02:00
parent 33e22c4f94
commit 8e727fb47a
2 changed files with 11 additions and 4 deletions
+4
View File
@@ -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
View File
@@ -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()