freebsd-skq/stand/lua
Kyle Evans bac5966e2d lualoader: rewrite try_include using lfs + dofile
Actual modules get require()'d in, rather than try_include(). All instances
of try_include should be provided with proper hooks/API in the rest of
loader to do the work they need to do, since we can't rely on them to exist.
Convert this now to lfs + dofile since we won't really be treating them as
modules.

lfs is required because dofile will properly throw an error if the file
doesn't exist, which is not in the spirit of 'optionally included'.

Getting out of the pcall game allows us to provide a loader.exit() style
call that backs out to the common bits of loader (autoboot sequence unless
disabled with a loader.setenv("autoboot_delay", "NO")). The most ideal way
identified so far to implement loader.exit() is to throw a special
abort-style error that indicates to the caller in interp_lua that we've not
actually errored out, just continue execution. Otherwise, we have to hack in
logic to bubble up and return from loader.lua without continuing further,
which gets kind of ugly depending on the context in which we're aborting.

A compat shim is provided temporarily in case the executing loader doesn't
yet have loader.lua_path, which was just added in r354246.
2019-11-02 04:01:39 +00:00
..
cli.lua lualoader: Add reload-conf loader command 2019-09-14 03:38:18 +00:00
cli.lua.8 lualoader: Add reload-conf loader command 2019-09-14 03:38:18 +00:00
color.lua lualoader: fix setting of loader_color=NO in loader.conf(5) 2019-10-21 20:17:31 +00:00
color.lua.8 Add color.lua(8), password.lua(8), and screen.lua(8) 2018-08-20 02:37:24 +00:00
config.lua Further normalize copyright notices 2019-09-26 16:19:22 +00:00
config.lua.8 Add config.lua(8) to the tree 2018-08-19 15:07:39 +00:00
core.lua lualoader: rewrite try_include using lfs + dofile 2019-11-02 04:01:39 +00:00
core.lua.8
drawer.lua lualoader: Revert to ASCII menu frame for serial console 2019-09-10 21:30:38 +00:00
drawer.lua.8 Add drawer.lua(8) 2018-08-20 02:08:39 +00:00
hook.lua
hook.lua.8
loader.lua lualoader: fix color usage 2018-08-30 13:29:32 +00:00
logo-beastie.lua loader_lua: lua color changes should end with reset 2019-09-22 17:39:20 +00:00
logo-beastiebw.lua
logo-fbsdbw.lua
logo-orb.lua loader_lua: lua color changes should end with reset 2019-09-22 17:39:20 +00:00
logo-orbbw.lua
Makefile stand: consolidate knowledge of lua path 2019-11-02 03:37:58 +00:00
menu.lua Further normalize copyright notices 2019-09-26 16:19:22 +00:00
menu.lua.8
password.lua Further normalize copyright notices 2019-09-26 16:19:22 +00:00
password.lua.8 Add color.lua(8), password.lua(8), and screen.lua(8) 2018-08-20 02:37:24 +00:00
screen.lua lualoader: don't botch disabling of color 2019-10-21 20:09:43 +00:00
screen.lua.8 Add color.lua(8), password.lua(8), and screen.lua(8) 2018-08-20 02:37:24 +00:00