[systemd-devel] question about Wants and unit start-up order
Mantas Mikulėnas
grawity at gmail.com
Fri Mar 23 19:45:52 UTC 2018
On Fri, Mar 23, 2018 at 5:41 PM, Brian J. Murrell <brian at interlinx.bc.ca>
wrote:
> If I have:
>
> Wants=system.slice nss-lookup.target named-setup-rndc.service
>
> in named-pkcs11.service, so shouldn't mean that named-pkcs11.service
> will be started up before the nss-lookup.target is Reached/Started?
>
No, dependencies do not imply any specific ordering. (The only exception is
when a .target wants/requires another unit.)
In other words, you will need to additionally list the same units in
After=, or in certain cases in Before=. (For example, named is a nss-lookup
provider, so it should have "Before=nss-lookup.target", but
"After=named-setup-mdc.service".)
On another note, Wants=system.slice is *very* redundant – all system
services go into that slice anyway.
--
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180323/42cd495c/attachment.html>
More information about the systemd-devel
mailing list