summaryrefslogtreecommitdiff
path: root/stand/lua/config.lua.8
AgeCommit message (Collapse)Author
2025-11-19stand/lua: Fix two typos in the manual pagesGordon Bergling
- s/Additionnaly/Additionally/ - s/commmand/command/ MFC after: 3 days
2025-05-12stand/lua manuals: Describe betterAlexander Ziaee
The lua boot loader module manuals were getting pulled into search results for FreeBSD, but not for "boot" or "loader". Reword them to increase clarity for boot or loader searches, as well as the FreeBSD search term which we've been scoping to system topic overview manuals. MFC after: 3 days Reviewed by: imp, mhorne Approved by: mhorne (mentor) Pull Request: https://github.com/freebsd/freebsd-src/pulls/1628
2024-02-02stand/lua: always allow overriding with local config filesStéphane Rochoy
Loader now also read configuration files listed in local_loader_conf_files. Files listed here are the last ones read. And /boot/loader.conf.local was moved from loader_conf_files to local_loader_conf_files leaving only loader.conf and device.hints in loader_conf_files by default. The idea is to ensure local_loader_conf_files, i.e., /boot/loader.conf.local, can always be used to override other user defined settings. So the sequencing is now as follow: 1. Bootstrap: /boot/defaults/loader.conf 2. Read loader_conf_files files: /boot/device.hints /boot/loader.conf 3. Read loader_conf_dirs files: /boot/loader.conf.d/*.conf 4. And finally, rread local_loader_conf_files files: /boot/loader.conf.local Reviewed by: imp, kevans Pull Request: https://github.com/freebsd/freebsd-src/pull/759
2024-02-02Revert "stand/lua: always allow overriding with local config files"Warner Losh
This reverts commit d3d0b735571d9562812ce5b343a6e91f7a795dbe. no mail sent out, and the commit message was wrong. Sponsored by: Netflix
2024-02-02stand/lua: always allow overriding with local config filesStéphane Rochoy
Loader now also read configuration files listed in local_loader_conf_files. Files listed here are the last ones read. And /boot/loader.conf.local was moved from loader_conf_files to local_loader_conf_files leaving only loader.conf and device.hints in loader_conf_files by default. The idea is to ensure local_loader_conf_files, i.e., /boot/loader.conf.local, can always be used to override other user defined settings. So the sequencing is now as follow: 1. Bootstrap: /boot/defaults/loader.conf 2. Read loader_conf_files files: /boot/device.hints /boot/loader.conf 3. Read loader_conf_dirs files: /boot/loader.conf.d/*.conf 4. And finally, rread local_loader_conf_files files: /boot/loader.conf.local
2023-08-16Remove $FreeBSD$: two-line nroff patternWarner Losh
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-05-12spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
2023-05-10lualoader: add support for .lua configuration filesKyle Evans
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
2020-12-17lualoader: cli: provide a show-module-options loader commandKyle Evans
This effectively dumps everything lualoader knows about to the console using the libsa pager; that particular lua interface was added in r368591. A pager stub implementation has been added that just dumps the output as-is as a compat shim for older loader binaries that do not have lpager. This stub should be moved into a more appropriate .lua file if we add anything else that needs the pager. Notes: svn path=/head/; revision=368728
2020-12-12lualoader: provide module-manipulation commandsKyle Evans
Specifically, we have: - enable-module - disable-module - toggle-module These can be used to add/remove modules to be loaded or force modules to be loaded in spite of modules_blacklist. In the typical case, a user is expected to use them to recover an issue happening due to a module directive they've added to their loader.conf or because they discover that they've under-specified what to load. MFC after: 1 week Notes: svn path=/head/; revision=368575
2020-04-30lualoader: config: improve readConfFiles, rename to readConfKyle Evans
The previous interface was pretty bad, and required the caller to get some implementation details correct that it really shouldn't need to (e.g. loader_conf_files handling) and pass in an empty table for it to use. The new and much improved interface, readConf, is much less of a hack; hiding these implementation details and just doing the right thing. config.lua will now use it to process /boot/defaults/loader.conf and the subsequent loader_conf_files from there, and read-conf will also use it. This improvement submitted by Olivier (cited below), loader_conf_files handling from the original patch was changed to just clobber it before processing and not bother restoring it after the fact following r360505 where it's now guaranteed to evade the loader environment. PR: 244640 Submitted by: Olivier Certner (olivier freebsd free fr> Notes: svn path=/head/; revision=360506
2020-04-28config.lua(8): catch up to recently added hooksKyle Evans
While we're here, let's stylize these as functions instead of just raw text. A future change may allow arbitrary data arguments to be passed some of these, and the distinction is useful. Notes: svn path=/head/; revision=360427
2020-04-28config.lua(8): "may should" is not proper grammarKyle Evans
Reported by: rpokala X-MFC-With: r360421 Notes: svn path=/head/; revision=360425
2020-04-28lualoader: config: start exporting readConfFilesKyle Evans
In the process, change it slightly: readConfFiles will take a string like loader_conf_files in addition to the loaded_files table that it normally takes. This is to facilitate the addition of a read-conf CLI command, which will just pass in the single file to read and an empty table. MFC after: 3 days Notes: svn path=/head/; revision=360421
2018-08-19Add config.lua(8) to the treeKyle Evans
Reviewed by: 0mp, rpokala (earlier version) Differential Revision: https://reviews.freebsd.org/D14819 Notes: svn path=/head/; revision=338054