LOADER.CONF.LUA(5)

NAME
loader.conf.lua - system bootstrap Lua configuration information

DESCRIPTION
When the lua-based loader(8) encounters a filename in loader_conf_files that has a “.lua” suffix, it will be loaded and executed by the lua interpreter in a limited environment.

The limited environment does not contain the ability to reference or load other lua modules. Existing loader environment variables may be referenced as if they were already defined global variables.

A lua configuration file may set any global variable, which will subsequently be processed and added to the environment after execution of the configuration file has completed. Other than the exec setting, all variables described in loader.conf(5) operate the same in the loader.conf.lua environment. Note that the settings describing module options can only be set in the environment; there is currently no way for a loader.conf.lua to fetch them. At this time, global table and function values are ignored.

The config.buildenv() hook will be run with an empty environment provided to it that may be populated by a custom local.lua.

SEE ALSO
loader.conf(5)

AUTHORS
The mechanism for loading loader.conf.lua files was originally written by Kyle Evans <kevans@FreeBSD.org>.