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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to