[systemd-devel] Creating units using D-Bus

Lennart Poettering lennart at poettering.net
Wed Jun 10 06:04:09 PDT 2015


B1;4002;0cOn Wed, 10.06.15 13:25, Simon McVittie (simon.mcvittie at collabora.co.uk) wrote:

> On 10/06/15 11:46, "Jóhann B. Guðmundsson" wrote:
> > I hate to say this since I'm against litter unit files across the entire
> > filesystem like infective disease and administrator then have to run
> > around trying to chase them down but is it not better to store this
> > under /srv somewhere [1], not etc, so it wont conflicts with "Stateless
> > Systems, Factory Reset, Golden Master" Systems?
> 
> To me this seems like (programmatically-assisted) configuration by a
> sysadmin, just like when NetworkManager writes configured networks into
> /etc/NetworkManager, or when `systemctl (en|dis)able` manipulates
> symlinks in /etc? "You reset to factory configuration by deleting /etc"
> seems entirely consistent with "tool-generated configuration goes in
> /etc" to me.
> 
> /srv is certainly not the place: if "no program should rely on a
> specific subdirectory structure of /srv" (that's a direct quote from the
> FHS) then systemd can't rely on a particular directory structure being a
> valid place to put its own files. You might say that systemd units could
> go in /srv/systemd, but the FHS' point is that it would be, for
> instance, entirely valid for the freedesktop.org administrators to use
> /srv/systemd as the directory for systemd.freedesktop.org's web content.
> 
> This makes /srv pretty useless from a distribution point of view, but
> useful for sysadmins - Debian's take on that directory is essentially
> "don't put anything in /srv out-of-the-box, so that the sysadmin can use
> it however they want to" (a lot like /opt).

Yes, I agree.

Also, again, as mentioned: we need to place this in a location that is
both writable (at least sometimes) and available from the moment we
transition from the initrd into the host. Otherwise we'd have to
reload configuration half-way after the other file systems become
available, and requeue a transaction which I'd really like to avoid to
have as a default. 

/var, /srv, /home do not qualify hence. /etc does. Hence it needs to
be /etc.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list