Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2018 03:39:55 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329426 - head/stand/lua
Message-ID:  <201802170339.w1H3dtBF026344@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Feb 17 03:39:55 2018
New Revision: 329426
URL: https://svnweb.freebsd.org/changeset/base/329426

Log:
  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".

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua	Sat Feb 17 03:13:05 2018	(r329425)
+++ head/stand/lua/menu.lua	Sat Feb 17 03:39:55 2018	(r329426)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802170339.w1H3dtBF026344>