[systemd-devel] Help regarding service dependency

Amit Saha asaha at redhat.com
Fri Mar 14 00:30:47 PDT 2014



----- Original Message -----
> From: "Andrey Borzenkov" <arvidjaar at gmail.com>
> To: "Amit Saha" <asaha at redhat.com>
> Cc: "systemd Mailing List" <systemd-devel at lists.freedesktop.org>
> Sent: Friday, March 14, 2014 12:35:44 PM
> Subject: Re: [systemd-devel] Help regarding service dependency
> 
> В Thu, 13 Mar 2014 21:25:34 -0400 (EDT)
> Amit Saha <asaha at redhat.com> пишет:
> 
> > Hello,
> > 
> > We have service1 which starts in default.target, and we want it to start
> > After service2
> > (systemd-readahead-done) which starts after the default.target is reached.
> > So, I think what would happen in this case is the After=service2 for
> > service1 is ignored
> > and it is started before service2 since the default.target must be reached.
> > 
> 
> There is no ordering dependencies between default.target and individual
> units; default.target is simply a way to define what is started using
> Wants. So it should work.

Thanks for your reply.

I am not sure I follow you when you say "there is no ordering dependency between
default.target and individual units". Let's say default.target.wants/ 
have N services. What happens when you have a service, service2 whose 
unit file has After=default.target in it?  When does it start? 

And, let's now introduce service1 which has:

[Install]                                                                                                                                                   
WantedBy=default.target                                                                                                                                  

How do the services, service1 and service2 start relative to each other and the services in 
default.target.wants?                   

Thanks,
Amit.


More information about the systemd-devel mailing list