[systemd-devel] systemctl start second.service first.service

Lennart Poettering lennart at poettering.net
Fri Jan 12 16:41:34 UTC 2018


On Do, 11.01.18 17:52, Uoti Urpala (uoti.urpala at pp1.inet.fi) wrote:

> At boot, both would be started as part of the same transaction (same
> would happen here if you started a third.service that depended on both
> first.service and second.service, then second.service would always
> wait). Here second.service is just started individually, and systemd
> has no idea at that time that first.service is going to be running at
> all. Given that, it really can't behave any differently (it can't delay
> the start of second.service to wait for first.service, when as far as
> it knows first.service may well never get started at all!). It's only
> after second.service is already running that it sees that first.service
> will be started, and at that point it's too late to make second.service
> wait. There really is nothing the init portion could do differently
> given the semantics of bare "After" (the behavior could be changed in
> the systemctl binary).

Yupp, this is exactly what happens.

That said, we should probably make the
multiple-operations-in-a-single-transaction thing happen.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list