[systemd-devel] question about Wants and unit start-up order

Brian J. Murrell brian at interlinx.bc.ca
Fri Mar 23 19:52:18 UTC 2018


On Fri, 2018-03-23 at 21:45 +0200, Mantas Mikulėnas wrote:
> 
> No, dependencies do not imply any specific ordering. (The only
> exception is
> when a .target wants/requires another unit.)

That seems odd but I will leave that aside for a moment...

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

That is the case:

# systemctl show named-pkcs11.service | grep -ie ^before -e ^after
Before=nss-lookup.target shutdown.target
After=system.slice named-setup-rndc.service tmp.mount -.mount var.mount network.target systemd-journald.socket basic.target named-dhcp.service

So it's still puzzling why they report out of order in the journal.

> On another note, Wants=system.slice is *very* redundant – all system
> services go into that slice anyway.

That was output from systemctl show so it was probbaby just reflecting
that, as the one above does.

Cheers,
b.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180323/cee17d63/attachment.sig>


More information about the systemd-devel mailing list