[systemd-devel] [PATCH] Drop Before=paths/sockets/timers.target from DefaultDependencies.
David Timothy Strauss
david at davidstrauss.net
Wed Jan 29 13:55:10 PST 2014
On Wed, Jan 29, 2014 at 3:14 AM, Lennart Poettering
<lennart at poettering.net> wrote:
> What's the rationale here?
Three possibilities for an *enabled* timer with DefaultDependencies=true:
(1) WantedBy=timers.target, which redundantly adds
Before=timers.target (because DefaultDependencies already adds it)
(2) WantedBy= and After=<something-later-than-timers.target> (like
multi-user.target), which creates a cycle systemd has to break (like
Before=timers.target combined with After=multi-user.target). This is
our use case, which we have because we want a timer to start at
multi-user.target completing.
(3) WantedBy=<something-earlier-than-timers.target> (like
sysinit.target), which is transitively redundant because
Before=basic.target is already before timers.target
So, having Before=timers.target as a default dependency is either
redundant or cyclical/conflicting. These same arguments are true for
sockets and (probably) paths.
> Documenting what DEfaultDependencies= does is something that has been on
> the todo list since a long time, we really should document this.
Yes, and documentation is an alternative that I mentioned to the patch.
More information about the systemd-devel
mailing list