aboutsummaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-02-17 03:39:55 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-02-17 03:39:55 +0000
commit702b460d41da7d050ede4f75439dcea6d3a2ab8e (patch)
treef04e5aa8dca4c607056723aeef16e448c31fcbc9 /stand
parent3a0a07d0eac82337f397d6e33d07ea35785e53cb (diff)
downloadsrc-702b460d41da7d050ede4f75439dcea6d3a2ab8e.tar.gz
src-702b460d41da7d050ede4f75439dcea6d3a2ab8e.zip
stand/lua: Correct interpretation of autoboot_delay
autoboot_delay=NO is documented to wait for input and *not* autoboot, which is the exact opposite of the current behavior. Additionally, autoboot_delay=-1 is documented to disallow the user from interrupting the boot (i.e. autoboot immediately), which was not previously honored. This also fixes the case insensitive comparison to be truly case insensitive. This is kind of nit-picky, but the previous version would only accept "no" and "NO".
Notes
Notes: svn path=/head/; revision=329426
Diffstat (limited to 'stand')
-rw-r--r--stand/lua/menu.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua
index 23eb1f774c31..c6f1d667d4d2 100644
--- a/stand/lua/menu.lua
+++ b/stand/lua/menu.lua
@@ -353,7 +353,9 @@ function menu.autoboot()
menu.already_autoboot = true;
local ab = loader.getenv("autoboot_delay");
- if ab == "NO" or ab == "no" then
+ if (ab ~= nil) and (ab:lower() == "no") then
+ return;
+ elseif (tonumber(ab) == -1) then
core.boot();
end
ab = tonumber(ab) or 10;