On Sun, Aug 22, 2021 at 03:33:23PM +0000, Clint Adams wrote: > On Sun, Aug 22, 2021 at 10:56:34AM +0200, Michael Biebl wrote: > > Hm, I'm a bit torn on this. If we go this route, then in order to be > > consistent, we'd have to create a whole bunch of such directories, basically > > for all those files: > > I understand the desire to be consistent, and I don't want to argue > for or against it, so I'll just talk about my experience. > > On laptops I override HandleLidSwitchExternalPower (and sometimes > HandleLidSwitch). Historically this has meant dealing with the > conffile handling question on every single update. Seeing this > time that there is now a drop-in directory available means the > possibility that I can just put a file in there and never have > to answer that question again. > > The lack of the directory makes me question whether I have the > path correct or if logind will actually look there. I have gone > ahead and made the directory myself though, and placed a > lidswitch.conf therein, but if the directory had been there already > I would have just blindly assumed that it would work (probably even > if I had failed to name it with a ".conf" suffix). > > So, is it worth it? I don't know either.
I added the support for some of these .d directories upstream, and I had these exact kinds of drop-ins in mind. I have a configuration .deb that I install on various systems for this exact bit of configuration: ~$ dpkg -L josh-config-logind /. /etc /etc/systemd /etc/systemd/logind.conf.d /etc/systemd/logind.conf.d/josh-config-logind.conf /usr /usr/share /usr/share/doc /usr/share/doc/josh-config-logind /usr/share/doc/josh-config-logind/changelog.gz /usr/share/doc/josh-config-logind/copyright ~$ cat /etc/systemd/logind.conf.d/josh-config-logind.conf [Login] HandleLidSwitch=lock (I should actually update those configuration packages to install their configuration in /usr rather than /etc.) I would very much prefer that we *not* add a bunch of empty directories in /etc, or for that matter in /usr. The manpages specifically list the paths for this, and those paths do work. And those directories will naturally come into existence when a package installs a file into them, and disappear when nothing installs files into them. I personally find it *much* easier to get a handle on a system's configuration in /etc when I can see at a glance what configuration directories actually contain configuration files, without having a pile of empty directories or empty configuration files. I'd like to request that, now that the release has happened, we change systemd's install-sysconfdir option to "false". - Josh Triplett
