On Fri, Oct 31, 2014 at 2:27 PM, Rich Freeman <ri...@gentoo.org> wrote:
> On Fri, Oct 31, 2014 at 1:34 PM, Tom H <tomh0...@gmail.com> wrote:


>> Is "After" really necessary as an option? I've never come across a
>> service that uses "After" without a "Requires" or a Wants" but I've
>> never taken the time to look.
>
> Hmm, I found After more common that Wants, but maybe I only look at
> units that have problems.  :)

LOL. Which supports the thesis that "After" might not be a useful
setting within a service unit. But it's just occured to me that target
units use "After" without "Requires" or "Wants", for example
network-online.target has "After=network.target".


> I think the intent is to handle optional dependencies, but in practice
> I don't know that it works well. It would almost be better to have
> some kind of cluster config file that specifies all the actual
> dependencies (possibly including cross-host) and have it spit out all
> the unit dependencies automatically. That is a bit much to ask for
> now, and probably a bit much for somebody who just wants their laptop
> to launch kde after all their mounts are ready.

Optional dependencies are handled by "Wants" like openrc's "use".

IIUC you're referring to a BSD-like rc daemon config file. WOuldn't
that have to be maintained by a sysadmin rather than by a package
maintainer?


> Specifying After vs Wants separately does make sense. Dependency
> doesn't have to imply sequential.

Do you have an example of a service that uses "After=" but doesn't
need a "Requires=" or a "Wants="? I'm either being unimaginative or
plain dumb, but I can't think of any. I wonder whether, if Lennart and
co removed "After=" from service units and turned "Requires=" into the
equivakent of the current "Requires=" and "After=" setup, someone
would raise a storm over the change because it would've broken
something.

Reply via email to