3cb2f5f369
If a file is specified in loader_conf_files that ends in '.lua', lualoader will now load and execute that file. These may be used in place of a traditional loader.conf to use more complicated logic, where some values may be set based on others or based on the environment that the C bits has left us with. Lua scripts are run in a limited environment. In particular, it does not get access to any modules or, in-fact, anything except environment variable. A config.buildenv hook has been added so that a local module can add whatever it may need to to the environment. When a global var is set in the lua script, it does not immediately alter the loader environment. Instead, the script's environment is initially empty and processed only if the whole script executes successfully. Effectively, a lua configuration file either takes effect or it does not, an error will not leave it in a half-baked state. Reviewed by: bcr (manpages), imp Differential Revision: https://reviews.freebsd.org/D28450
34 lines
468 B
Makefile
34 lines
468 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
MAN= loader.conf.lua.5 \
|
|
cli.lua.8 \
|
|
color.lua.8 \
|
|
config.lua.8 \
|
|
core.lua.8 \
|
|
drawer.lua.8 \
|
|
hook.lua.8 \
|
|
menu.lua.8 \
|
|
password.lua.8 \
|
|
screen.lua.8
|
|
|
|
FILESDIR= ${LUAPATH}
|
|
FILES= cli.lua \
|
|
color.lua \
|
|
config.lua \
|
|
core.lua \
|
|
drawer.lua \
|
|
hook.lua \
|
|
loader.lua \
|
|
gfx-beastie.lua \
|
|
gfx-beastiebw.lua \
|
|
gfx-fbsdbw.lua \
|
|
gfx-orb.lua \
|
|
gfx-orbbw.lua \
|
|
menu.lua \
|
|
password.lua \
|
|
screen.lua
|
|
|
|
.include <bsd.prog.mk>
|