aboutsummaryrefslogtreecommitdiff
path: root/stand/lua/config.lua.8
Commit message (Collapse)AuthorAgeFilesLines
* stand/lua: Fix two typos in the manual pagesGordon Bergling2025-11-221-1/+1
| | | | | | | - s/Additionnaly/Additionally/ - s/commmand/command/ (cherry picked from commit 6f14b6025a6f6475522697362aaf6c84514b85bf)
* stand/lua manuals: Describe betterAlexander Ziaee2025-05-151-2/+2
| | | | | | | | | | | | | | 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 (cherry picked from commit 5d59c1b4f14e2fa6388b1d75ee3243085f1c69f2)
* stand/lua: always allow overriding with local config filesStéphane Rochoy2024-04-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 [[ The commit, revert, recommit has been squashed down to record the merge ]] (cherry picked from commit c475e61f66fe8fe939e18ec7821c2340569f3271) (cherry picked from commit 5fdf01dbeef1f64f8c446561498d662702451ac1) (cherry picked from commit d3d0b735571d9562812ce5b343a6e91f7a795dbe)
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | 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
* lualoader: add support for .lua configuration filesKyle Evans2023-05-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | 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
* lualoader: cli: provide a show-module-options loader commandKyle Evans2020-12-171-1/+10
| | | | | | | | | | | | | 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
* lualoader: provide module-manipulation commandsKyle Evans2020-12-121-1/+20
| | | | | | | | | | | | | | | | | | 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
* lualoader: config: improve readConfFiles, rename to readConfKyle Evans2020-04-301-8/+17
| | | | | | | | | | | | | | | | | | | | | | 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
* config.lua(8): catch up to recently added hooksKyle Evans2020-04-281-2/+4
| | | | | | | | | 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
* config.lua(8): "may should" is not proper grammarKyle Evans2020-04-281-1/+1
| | | | | | | | Reported by: rpokala X-MFC-With: r360421 Notes: svn path=/head/; revision=360425
* lualoader: config: start exporting readConfFilesKyle Evans2020-04-281-1/+10
| | | | | | | | | | | | 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
* Add config.lua(8) to the treeKyle Evans2018-08-191-0/+188
Reviewed by: 0mp, rpokala (earlier version) Differential Revision: https://reviews.freebsd.org/D14819 Notes: svn path=/head/; revision=338054