menu.lua (abc4f7e735da8c11c390ef742d5fa9823db54168) menu.lua (b458bf0da189587ec98a715fcb30da3317263cde)
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- All rights reserved.
4--
5-- Redistribution and use in source and binary forms, with or without
6-- modification, are permitted provided that the following conditions
7-- are met:
8-- 1. Redistributions of source code must retain the above copyright

--- 138 unchanged lines hidden (view full) ---

147 entry_type = "entry",
148 name = function()
149 return color.highlight("B").."oot Multi user "..color.highlight("[Enter]");
150 end,
151 func = function()
152 core.setSingleUser(false);
153 core.boot();
154 end,
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- All rights reserved.
4--
5-- Redistribution and use in source and binary forms, with or without
6-- modification, are permitted provided that the following conditions
7-- are met:
8-- 1. Redistributions of source code must retain the above copyright

--- 138 unchanged lines hidden (view full) ---

147 entry_type = "entry",
148 name = function()
149 return color.highlight("B").."oot Multi user "..color.highlight("[Enter]");
150 end,
151 func = function()
152 core.setSingleUser(false);
153 core.boot();
154 end,
155 alias = {"b", "B", "\013"}
155 alias = {"b", "B"}
156 },
157
158 -- boot single user
159 {
160 entry_type = "entry",
161 name = function()
162 return "Boot "..color.highlight("S").."ingle user";
163 end,

--- 103 unchanged lines hidden (view full) ---

267 local alias_table = drawer.drawscreen(m);
268
269-- menu.autoboot();
270
271 cont = true;
272 while cont do
273 local key = io.getchar();
274
156 },
157
158 -- boot single user
159 {
160 entry_type = "entry",
161 name = function()
162 return "Boot "..color.highlight("S").."ingle user";
163 end,

--- 103 unchanged lines hidden (view full) ---

267 local alias_table = drawer.drawscreen(m);
268
269-- menu.autoboot();
270
271 cont = true;
272 while cont do
273 local key = io.getchar();
274
275 -- Exit on backspace
275 -- Special key behaviors
276 if (key == 127) and (m ~= menu.welcome) then
277 break
276 if (key == 127) and (m ~= menu.welcome) then
277 break
278 elseif (key == 13) then
279 core.boot();
280 -- Should not return
278 end
279
280 key = string.char(key)
281 -- check to see if key is an alias
282 local sel_entry = nil;
283 for k, v in pairs(alias_table) do
284 if (key == k) then
285 sel_entry = v;

--- 100 unchanged lines hidden ---
281 end
282
283 key = string.char(key)
284 -- check to see if key is an alias
285 local sel_entry = nil;
286 for k, v in pairs(alias_table) do
287 if (key == k) then
288 sel_entry = v;

--- 100 unchanged lines hidden ---