[systemd-devel] Why does sysv generator translate Required-Start keyword into an After= ordering dep only ?
Francis Moreau
francis.moro at gmail.com
Thu Feb 25 21:55:29 UTC 2016
On Wed, Feb 24, 2016 at 6:12 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Wed, 24.02.16 17:40, Francis Moreau (francis.moro at gmail.com) wrote:
>
>> Hello,
>>
>> It seems that the unit generator for sysv init scripts translate
>> "Required-Start: X" into "After=X" native ordering deps only.
>>
>> I would also have expected it to add the following dependency "Requires=X" too.
>>
>> What am I missing ?
>
> Well, on SysV the requirement in the "Required-Start:" concept is
> actually a request to the tool that enables/disables a service
> (i.e. the chkconfig or update-rcd tool, depending on the distro). It
> means that it shall enable another service "b" if "a" is to be
> enabled.
"mbiebl" on #debian-systemd gave me the same explanation (thanks to him).
However beside enabling service "b", the tool will also enable it so
that "b" will be started by sysvinit before service "a"
>
> Requires= in systemd otoh is something that applies to the actual
> activation time of a service. The counterpart of "Required-Start:" in
> systemd concepts would actually be the Also= line in [Install], if you
> follow what I mean.
hmm but Also= doesn't have the notion of ordering, I think.
>
> systemd leaves enabling/disabling of sysv services to
> chkconfig/update-rcd hence it will not act on that line regarding
> requirement. It will however act on the ordering, since that's
> inherently something systemd itself cares about.
>
> Hope that makes sense?
>
Yes Thanks.
But now I'm wondering how the following case is handled: a sysinit
script "a" has "Required-Start: b". But "b" is a native systemd
service. I don't think the tool that enable/disable sysv services can
enable and order correctly the native service.
--
Francis
More information about the systemd-devel
mailing list