menu.lua (7efc058f76fa7af45860d864f4f9cd93b2c35de4) menu.lua (7dcffa90422503a5067d88360a7771687be41dd7)
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
4-- All rights reserved.
5--
6-- Redistribution and use in source and binary forms, with or without
7-- modification, are permitted provided that the following conditions
8-- are met:

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

356 end
357
358 -- redraw screen
359 screen.clear()
360 screen.defcursor()
361 local alias_table = drawer.drawscreen(m)
362
363 -- Might return nil, that's ok
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- Copyright (C) 2018 Kyle Evans <kevans@FreeBSD.org>
4-- All rights reserved.
5--
6-- Redistribution and use in source and binary forms, with or without
7-- modification, are permitted provided that the following conditions
8-- are met:

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

356 end
357
358 -- redraw screen
359 screen.clear()
360 screen.defcursor()
361 local alias_table = drawer.drawscreen(m)
362
363 -- Might return nil, that's ok
364 local autoboot_key = menu.autoboot()
365
364 local autoboot_key;
365 if m == menu.default then
366 autoboot_key = menu.autoboot()
367 end
366 cont = true
367 while cont do
368 local key = autoboot_key or io.getchar()
369 autoboot_key = nil
370
371 -- Special key behaviors
372 if (key == core.KEY_BACKSPACE or key == core.KEY_DELETE) and
373 m ~= menu.default then

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

425 end
426
427 c = string.lower(loader.getenv("beastie_disable") or "")
428 print("beastie_disable", c)
429 return c == "yes"
430end
431
432function menu.autoboot()
368 cont = true
369 while cont do
370 local key = autoboot_key or io.getchar()
371 autoboot_key = nil
372
373 -- Special key behaviors
374 if (key == core.KEY_BACKSPACE or key == core.KEY_DELETE) and
375 m ~= menu.default then

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

427 end
428
429 c = string.lower(loader.getenv("beastie_disable") or "")
430 print("beastie_disable", c)
431 return c == "yes"
432end
433
434function menu.autoboot()
433 if menu.already_autoboot then
434 return nil
435 end
436 menu.already_autoboot = true
437
438 local ab = loader.getenv("autoboot_delay")
439 if ab ~= nil and ab:lower() == "no" then
440 return nil
441 elseif tonumber(ab) == -1 then
442 core.boot()
443 end
444 ab = tonumber(ab) or 10
445

--- 34 unchanged lines hidden ---
435 local ab = loader.getenv("autoboot_delay")
436 if ab ~= nil and ab:lower() == "no" then
437 return nil
438 elseif tonumber(ab) == -1 then
439 core.boot()
440 end
441 ab = tonumber(ab) or 10
442

--- 34 unchanged lines hidden ---