[systemd-devel] Creating units using D-Bus

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Jun 10 05:25:50 PDT 2015


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).

-- 
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>



More information about the systemd-devel mailing list