[systemd-devel] [PATCH] Drop Before=paths/sockets/timers.target from DefaultDependencies.

Thomas Bächler thomas at archlinux.org
Wed Jan 29 01:16:06 PST 2014


Am 29.01.2014 03:49, schrieb Andrey Borzenkov:
>> Zbyszek's argument for the patch, however, is that following the
>> recommended WantedBy= behavior already applies the same Before=
>> dependency,
> 
> Where is *this* documented? Unless I misunderstand what you say.

The documentation (and code) regarding the sometimes unexpected
behaviour of DefaultDependencies is scattered in a few places - this
cost me some time when I first learned how to systemd.

From systemd.unit(5):
> If true, (the default), a few default dependencies will implicitly be
> created for the unit. The actual dependencies created depend on the
> unit type.

Now, it is true that when you look at systemd.service(5) and friends,
there is no mention of this implicit Before= dependency mentioned above.
Even when you look at the code, you won't find it directly.

Eventually, you'll find this bit in systemd.target(5):
> Unless DefaultDependencies= is set to false, target units will
> implicitly complement all configured dependencies of type Wants=,
> Requires=, RequiresOverridable= with dependencies of type After= if
> the units in question also have DefaultDependencies=true

So, in order to understand DefaultDependencies, you need to read the
related bits in systemd.unit(5), systemd.service(5), systemd.timer(5),
systemd.socket(5), systemd.path(5), systemd.slice(5), systemd.swap(5)
and systemd.target(5). The manpages systemd.mount(5) and
systemd.automount(5) seem to lack any information about default
dependencies.

This is really annoying to learn - I'd suggest collecting all this
information in one place - IMO, it belongs either into systemd.unit(5)
or into its own manpage.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140129/ee574047/attachment.pgp>


More information about the systemd-devel mailing list