[systemd-devel] systemctl start second.service first.service
Lennart Poettering
lennart at poettering.net
Fri Jan 12 13:20:31 UTC 2018
On Do, 11.01.18 10:59, 林自均 (johnlinp at gmail.com) wrote:
> Hi folks,
>
> I have 2 service unist: first.service and second.service. I configured
> "After=first.service" in second.service. Both services are "Type=oneshot".
>
> If I execute:
>
> # systemctl start first.service second.service
>
> The ordering dependency will work, i.e. second.service will start after
> first.service.
>
> However, if I execute:
>
> # systemctl start second.service first.service
>
> first.service and second.service will start at the same time.
>
> Is this behavior documented somewhere? Thanks!
Currently, "systemctl start foo bar baz" is equivalent to "systemctl
start foo && systemctl start bar && systemctl start baz" in respect to
ordering.
And yeah, we should handle this differently, and make one transaction
of such an expression, so that the defined ordering between the jobs
is honoured here. There has been some work to make this happen a while
back, but it never got anywhere.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list