[systemd-devel] Difference between After and RequiredBy

Edward Z. Yang ezyang at MIT.EDU
Tue Nov 29 08:41:40 PST 2011


Excerpts from Colin Guthrie's message of Tue Nov 29 11:32:01 -0500 2011:
> I think RequiredBy is just the same semantically as Requires (it just
> allows the requirement to be specified in a remote unit), in which case
> this section from the manual page (man 5 systemd.unit) should explain
> things. Ultimately Wants/Requires do not implicitly guide the ordering
> of service start, but Before/After do. With Requires/Wants both services
> might be started at the same time and thus one service needs the other
> to be up and running while it starts up, you will need to add the
> After/Before keys somewhere. It's worth reading the rest of the man
> page, especially the section on Before= and After=.

OK, so in this particular case, under some circumstances 'httpd'
would "require" 'remote-fs' (namely, if your document root is on
the remote filesystem) and would not require it otherwise.

In this case of 'sometimes' requirement, should 'Requires' be specified?

Edward


More information about the systemd-devel mailing list