On Fri, Mar 14, 2014 at 11:30 AM, Amit Saha <[email protected]> wrote: > > > ----- Original Message ----- >> From: "Andrey Borzenkov" <[email protected]> >> To: "Amit Saha" <[email protected]> >> Cc: "systemd Mailing List" <[email protected]> >> 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 <[email protected]> пишет: >> >> > 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. >
My apologies; I tend to miss implicit dependencies. So yes, by default if default.target Wants some unit it will be also ordered After this unit. > 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? > By default this creates a loop and systemd will need to break it; it hopefully will ignore After=default.target. But your unit definition in initial post had DefaultDependencies=false. In this case I expect that no implicit Before=default.target will be added. Did you test it? > 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. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
