core.lua (e25152834cdf3b353892835a4f3b157e066a8ed4) | core.lua (8f3b36103b20049e207e64039ad3e99ffb5b51e2) |
---|---|
1-- 2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3-- 4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org> 5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6-- All rights reserved. 7-- 8-- Redistribution and use in source and binary forms, with or without --- 437 unchanged lines hidden (view full) --- 446 if k > 1 then 447 new_tbl[k - 1] = v 448 end 449 end 450 451 return first_value, new_tbl 452end 453 | 1-- 2-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3-- 4-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org> 5-- Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6-- All rights reserved. 7-- 8-- Redistribution and use in source and binary forms, with or without --- 437 unchanged lines hidden (view full) --- 446 if k > 1 then 447 new_tbl[k - 1] = v 448 end 449 end 450 451 return first_value, new_tbl 452end 453 |
454function core.getConsoleName() 455 if loader.getenv("boot_multicons") ~= nil then 456 if loader.getenv("boot_serial") ~= nil then 457 return "Dual (Serial primary)" 458 else 459 return "Dual (Video primary)" 460 end 461 else 462 if loader.getenv("boot_serial") ~= nil then 463 return "Serial" 464 else 465 return "Video" 466 end 467 end 468end 469 470function core.nextConsoleChoice() 471 if loader.getenv("boot_multicons") ~= nil then 472 if loader.getenv("boot_serial") ~= nil then 473 loader.unsetenv("boot_serial") 474 else 475 loader.unsetenv("boot_multicons") 476 loader.setenv("boot_serial", "YES") 477 end 478 else 479 if loader.getenv("boot_serial") ~= nil then 480 loader.unsetenv("boot_serial") 481 else 482 loader.setenv("boot_multicons", "YES") 483 loader.setenv("boot_serial", "YES") 484 end 485 end 486end 487 |
|
454recordDefaults() 455hook.register("config.reloaded", core.clearCachedKernels) 456return core | 488recordDefaults() 489hook.register("config.reloaded", core.clearCachedKernels) 490return core |