[systemd-devel] How to properly write an "umbrella" unit

Lennart Poettering lennart at poettering.net
Fri Jul 24 06:00:58 PDT 2015


On Fri, 24.07.15 11:07, Krzysztof Kotlenga (k.kotlenga at sims.pl) wrote:

> Unfortunately one cannot specify ConsistsOf in a unit file, which
> is a really annoying limitation.

That limitation exists for a reason: systemd loads unit files lazily:
only units that are referenced by some other unit are loaded. Thus,
just sticking a unit file somewhere, and writing ConsistsOf= into it,
would generally not work, since the dep would never be considered
unless you also have a dep from something else on it. To avoid this
confusion we simply don't support it at all.

(Only way to make this work would be by allowing ConsistsOf= deps via
.consistsof subdirs with symlinks like we support it for .wants, and
then have ConsistsOf= in the [Install] section, if you follow what I
mean).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list