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

Reply via email to