[systemd-devel] Why does sysv generator translate Required-Start keyword into an After= ordering dep only ?

Andrei Borzenkov arvidjaar at gmail.com
Tue Mar 8 08:23:21 UTC 2016


08.03.2016 11:07, Francis Moreau пишет:
> On Tue, Mar 8, 2016 at 7:51 AM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>> 07.03.2016 10:04, Francis Moreau пишет:
>>> Hello,
>>>
>>> Sorry for the long delay.
>>>
>>> On Fri, Feb 26, 2016 at 5:05 AM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>>>> 26.02.2016 00:55, Francis Moreau пишет:
>>>>>
>>>>> 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.
>>>>>
>>>>
>>>> What difference does it make?
>>>
>>> The difference is that in my current understanding nothing will pull "b" in.
>>
>> That was answered in part you trimmed off. sysvinit never actively
>> pulled "b" in either so nothing really changed here.
>>
> 
> In my understanding insserv is part of the sysvinit implementation.
> 
> Therefore to enable a service with sysvinit, we do:
> 
>  - insserv a (this will create S<xx>a *and* S<yy>b" with yy < xx)

That would be new to me. insserv creates links ("enables") exactly those
services that you specify. So if you say "insserv a" you will get only
"a" enabled; this /may/ rearrange other services including "b" if they
are already enabled but this will not enable "b".

>  - init will start *both* a and b
> 
> However with systemd and 'b' being a native unit:
> 
>  - insserv a (this will create S<xx>a only)
>  - systemd will only start a
> 



More information about the systemd-devel mailing list