Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 15:19:48 +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: r332106 - head/stand/lua
Message-ID:  <201804061519.w36FJmmg094622@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Apr  6 15:19:48 2018
New Revision: 332106
URL: https://svnweb.freebsd.org/changeset/base/332106

Log:
  lualoader: Fix menu skipping with loader.conf(5) vars
  
  Earlier efforts to stop loading the menu broke the ability to skip the menu
  with, e.g., beastie_disable in loader.conf(5) as it was decided before
  configuration was read.
  
  Defer bringing in the menu module until we've loaded configuration so that
  we can make a more informed decision on whether the menu should be skipped
  or not.

Modified:
  head/stand/lua/loader.lua

Modified: head/stand/lua/loader.lua
==============================================================================
--- head/stand/lua/loader.lua	Fri Apr  6 15:17:09 2018	(r332105)
+++ head/stand/lua/loader.lua	Fri Apr  6 15:19:48 2018	(r332106)
@@ -37,15 +37,17 @@ require("cli")
 local color = require("color")
 local core = require("core")
 local config = require("config")
-local menu
-if not core.isMenuSkipped() then
-	menu = require("menu")
-end
 local password = require("password")
+-- The menu module will be brought in after config has loaded if we actually
+-- need it.
+local menu
 
 try_include("local")
 
 config.load()
+if not core.isMenuSkipped() then
+	menu = require("menu")
+end
 if core.isUEFIBoot() then
 	loader.perform("efi-autoresizecons")
 end



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