Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2018 16:36:29 +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: r329587 - head/stand/lua
Message-ID:  <201802191636.w1JGaTci003687@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Feb 19 16:36:29 2018
New Revision: 329587
URL: https://svnweb.freebsd.org/changeset/base/329587

Log:
  stand/lua: Swap single-/multi- user boot entries as needed

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua	Mon Feb 19 16:35:46 2018	(r329586)
+++ head/stand/lua/menu.lua	Mon Feb 19 16:36:29 2018	(r329587)
@@ -133,7 +133,19 @@ menu.boot_options = {
 };
 
 menu.welcome = {
-	entries = {
+	entries = function()
+		local menu_entries = menu.welcome.all_entries;
+		-- Swap the first two menu items on single user boot
+		if (core.isSingleUserBoot()) then
+			local multiuser = menu_entries[1];
+			local singleuser = menu_entries[2];
+
+			menu_entries[2] = multiuser;
+			menu_entries[1] = singleuser;
+		end
+		return menu_entries;
+	end,
+	all_entries = {
 		-- boot multi user
 		{
 			entry_type = core.MENU_ENTRY,



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