aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrus Rahman <crahman@gmail.com>2023-04-16 02:30:41 +0000
committerKyle Evans <kevans@FreeBSD.org>2023-04-16 02:39:56 +0000
commit0ab68e9272b573becdb42edf2b4419cb7ab04707 (patch)
tree0d0389b04987aa571725b545b023524a0509accb
parentd7584aa09fcf8d96544e5bfb3ea78f50d7720c0c (diff)
downloadsrc-0ab68e9272b573becdb42edf2b4419cb7ab04707.tar.gz
src-0ab68e9272b573becdb42edf2b4419cb7ab04707.zip
loader: lua: disable autoboot timer after password entry
In the lua loader, if one sets a password in loader.conf, the autoboot_delay timer will start before the menu is displayed. One can interrupt the autoboot and bring up the menu by entering a keyboard character before the timer expires. If this is done a prompt for the password is displayed. Entering the password will bring up the menu, but the timer will again start and another keyboard character must be entered or autoboot will abort the menu and boot the system. PR: 265472 Reviewed by: kevans MFC after: 3 days
-rw-r--r--stand/lua/password.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/stand/lua/password.lua b/stand/lua/password.lua
index 8edd4edd7ec3..3aea8e80bae6 100644
--- a/stand/lua/password.lua
+++ b/stand/lua/password.lua
@@ -135,6 +135,7 @@ function password.check()
local pwd = loader.getenv("password")
if pwd ~= nil then
core.autoboot()
+ loader.setenv("autoboot_delay", "NO")
-- The autoboot sequence was interrupted, so we'll need to
-- prompt for a password. Put the screen back into a known
-- good state, otherwise we're drawing back a couple lines