LOADER.CONF.LUA(5)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… LOADER.CONF.LUA(5) πŸ’…

okay so bestie, get comfy β€” this is loader.conf.lua, from the File Formats Manual section, and it's literally the whole "system bootstrap Lua configuration information" situation πŸŽ€


✨ NAME ✨

loader.conf.lua β€” system bootstrap Lua configuration information 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: when the lua-based loader(8) spots a filename over in loader_conf_files that has a .lua suffix, it's gonna load that file up and execute it with the lua interpreter β€” but in a limited environment, okay? lowkey important πŸ‘‘

And that limited environment? It does not contain the ability to reference or load any other lua modules. nope, not happening, not today πŸ™ˆ What it does have: existing loader environment variables can be referenced as if they were already defined global variables. so cute, so convenient πŸ’–

A lua configuration file may set any global variable, and those get subsequently processed and added to the environment after execution of the configuration file has completed ✨ Other than the exec setting, all the variables described in loader.conf(5) operate exactly the same in the loader.conf.lua environment. same energy, different font πŸ’…

🫢 heads up bestie: 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. And at this time, global table and function values are ignored. 😭

Also the config.buildenv() hook will be run with an empty environment provided to it, and that environment may be populated by a custom local.lua. the more u know 🌈


πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

The mechanism for loading loader.conf.lua files was originally written by Kyle Evans <kevans@FreeBSD.org>. absolute icon, we stan 🫢πŸ”₯


✿ and that's the whole page, bestie ✿ This vibe check came from the Debian edition, dated May 10, 2023, of the LOADER.CONF.LUA(5) manual page. go configure ur bootloader, main character πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from