[systemd-devel] [PATCHv2] logind: Support logind.conf.d directories in the usual search paths
josh at joshtriplett.org
josh at joshtriplett.org
Mon Oct 20 11:28:57 PDT 2014
On Mon, Oct 20, 2014 at 07:44:19PM +0200, Lennart Poettering wrote:
> On Fri, 17.10.14 06:29, Josh Triplett (josh at joshtriplett.org) wrote:
>
> > This makes it possible to drop in logind configuration snippets from a
> > package or other configuration management mechanism.
> >
> > Introduce a new helper, conf_parse_many, to parse configuration files in
> > a search path.
> >
> > systemd now installs /usr/lib/systemd/logind.conf.d/50-default.conf
> > rather than /etc/systemd/logind.conf . Distributions should migrate
> > existing modified versions of /etc/systemd/logind.conf to
> > /etc/systemd/logind.conf.d/50-default.conf .
> >
> > Move the logind.conf manpage to logind.conf.d, update it to document the
> > search paths, and update all references to it.
>
> Humm....
>
> I'd really prefer if we'd keep things in logind.conf and just provide
> the option of using logind.conf.d. This would be similar to unit
> files, where the unit files are where the beef is and .d/ is just a
> way to override/extend is. THe man page of logind.conf should
> reference the ability that .d/ files are supported, but that should be
> it for the documentation. We should really try to not to be too
> surprising here for admins which tend to expect one configuration
> file, not many.
The main awkwardness there is that /etc/logind.conf, as a file in /etc,
should be parsed *after* /usr/lib/systemd/logind.conf.d/ and *before*
/etc/systemd/logind.conf.d/ , which breaks the usual logic to load all
files in order with files in /etc overriding files in /usr.
Suggestions?
> Also, I'd really prefer if we could do the same for all configuration
> files in /etc/systemd/*.conf, not just for logind.conf...
I'd be happy to, but I wanted to sort out the pattern before expanding
it to other cases.
> An additional idea might be to document in the main config files as a
> comment that extensions may be placed in the .d/ subdirs, to make this
> functionality more discoverable?
Yeah, if we keep logind.conf then it makes sense to document the .d/
variant there.
> > For systemd, are "git format-patch -M" patches (with git-style renames
> > rather than whole-file deletion/insertions) acceptable for mailing list
> > review? That format makes renames much easier to review.
>
> Sure!
Glad to hear that.
- Josh Triplett
More information about the systemd-devel
mailing list