Page MenuHomeFreeBSD

First cut at a loader.conf.d support
ClosedPublic

Authored by kevans on Jul 10 2020, 2:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 2:32 PM
Unknown Object (File)
Wed, Apr 10, 5:12 AM
Unknown Object (File)
Mar 11 2024, 6:57 AM
Unknown Object (File)
Mar 11 2024, 6:57 AM
Unknown Object (File)
Mar 11 2024, 6:57 AM
Unknown Object (File)
Mar 7 2024, 11:24 PM
Unknown Object (File)
Mar 7 2024, 10:22 PM
Unknown Object (File)
Mar 7 2024, 5:33 PM
Subscribers

Details

Summary

After we've finished processing all of the loader_conf_files at the root of the include tree, grab loader_conf_dirs and process any files within.

Currently nothing is off-limits; any files placed in one of these directories will be read.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

allanjude added a reviewer: allanjude.

Reviewed By: allanjude

This revision is now accepted and ready to land.Jul 10 2020, 2:30 AM
rpokala added inline comments.
stand/lua/config.lua
538

I'm having trouble parsing that pattern...?

stand/lua/config.lua
538

https://www.lua.org/manual/5.3/manual.html#6.4.1

A series of alphanumeric and punctuation characters, since that's also what we used for loader_conf_files. For punctuation, see ispunct(3)

Code LGTM; suggestion for the manpage.

stand/defaults/loader.conf.5
259–261

While here, describe loader_conf_files too, since it doesn't have a description.

stand/lua/config.lua
544

I think we want to restrict this to foo.conf, since emacs likes to leave behind foo.conf~ files.

stand/lua/config.lua
544

I'm on board with this, too. I wouldn't mind being able to move things to foo.conf.disabled or keep around foo.conf.old files, beyond just tolerating obnoxious editor defaults.

stand/lua/config.lua
544

Yeah, making it loader.conf.d/*.conf is probably the safer thing to do.

stand/lua/config.lua
544

Sure, it's trivial to fix so I'll do so pre-commit. At some point I'd like to open up the option of .lua config files, too, but this is a similarly trivial addition later when I get to that point.