#
c475e61f |
| 21-Dec-2023 |
Stéphane Rochoy <stephane.rochoy@stormshield.eu> |
stand/lua: always allow overriding with local config files
Loader now also read configuration files listed in local_loader_conf_files. Files listed here are the last ones read. And /boot/loader.conf
stand/lua: always allow overriding with local config files
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
show more ...
|
#
5fdf01db |
| 02-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
Revert "stand/lua: always allow overriding with local config files"
This reverts commit d3d0b735571d9562812ce5b343a6e91f7a795dbe. no mail sent out, and the commit message was wrong.
Sponsored by:
Revert "stand/lua: always allow overriding with local config files"
This reverts commit d3d0b735571d9562812ce5b343a6e91f7a795dbe. no mail sent out, and the commit message was wrong.
Sponsored by: Netflix
show more ...
|
#
d3d0b735 |
| 21-Dec-2023 |
Stéphane Rochoy <stephane.rochoy@stormshield.eu> |
stand/lua: always allow overriding with local config files
Loader now also read configuration files listed in local_loader_conf_files. Files listed here are the last ones read. And /boot/loader.conf
stand/lua: always allow overriding with local config files
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
show more ...
|
Revision tags: release/14.0.0 |
|
#
fa9896e0 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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
show more ...
|
#
3cb2f5f3 |
| 11-May-2023 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: add support for .lua configuration files
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 tr
lualoader: add support for .lua configuration files
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
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
7ed84fa1 |
| 17-Dec-2020 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: cli: provide a show-module-options loader command
This effectively dumps everything lualoader knows about to the console using the libsa pager; that particular lua interface was added in
lualoader: cli: provide a show-module-options loader command
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.
show more ...
|
#
4634bb1f |
| 12-Dec-2020 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: provide module-manipulation commands
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 l
lualoader: provide module-manipulation commands
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
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
3fe0ac6a |
| 30-Apr-2020 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: config: improve readConfFiles, rename to readConf
The previous interface was pretty bad, and required the caller to get some implementation details correct that it really shouldn't need t
lualoader: config: improve readConfFiles, rename to readConf
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>
show more ...
|
#
60a2823c |
| 28-Apr-2020 |
Kyle Evans <kevans@FreeBSD.org> |
config.lua(8): catch up to recently added hooks
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 t
config.lua(8): catch up to recently added hooks
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.
show more ...
|
#
aa3d34de |
| 28-Apr-2020 |
Kyle Evans <kevans@FreeBSD.org> |
config.lua(8): "may should" is not proper grammar
Reported by: rpokala X-MFC-With: r360421
|
#
7a5c6c8b |
| 28-Apr-2020 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: config: start exporting readConfFiles
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 ta
lualoader: config: start exporting readConfFiles
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
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
7847e041 |
| 24-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338026 through r338297, and resolve conflicts.
|
#
088b5ad3 |
| 19-Aug-2018 |
Kyle Evans <kevans@FreeBSD.org> |
Add config.lua(8) to the tree
Reviewed by: 0mp, rpokala (earlier version) Differential Revision: https://reviews.freebsd.org/D14819
|