[systemd-devel] Question about After/Before of services

Mirco Tischler mt-ml at gmx.de
Thu Aug 9 07:06:44 PDT 2012


2012/8/9 "Jóhann B. Guðmundsson" <johannbg at gmail.com>:
> On 08/09/2012 04:28 AM, WANG Chao wrote:
>>
>> Hi, list
>>
>> As you see in the subject, this question comes from a lazy guy like me,
>> who doesn't read the systemd source code at all :P
>>
>> The silly question is if A is configured to 'Wants:B' and 'After:B', will
>> A start exactly after B is finished or after B is started?
>
>
> Yes
>
> If A.service unit has Wants=B.service and After=B.service it will be start
> after B.service has finished starting *unless* B.service unit is
> Type=oneshot service then it will be started immediately after B.service is
> has been started not when B.service has finished starting...
>
> JBG

Or unless B.service is Type=simple (the default). In this case systemd
has no way to tell when B.service has finished starting and continues
to start A.service right away.

Mirco


More information about the systemd-devel mailing list