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

2016-03-08 Thread Andrei Borzenkov
08.03.2016 11:33, Francis Moreau пишет:
> On Tue, Mar 8, 2016 at 9:23 AM, Andrei Borzenkov  wrote:
>> 08.03.2016 11:07, Francis Moreau пишет:
>>> On Tue, Mar 8, 2016 at 7:51 AM, Andrei Borzenkov  
>>> 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  
> 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 Sa *and* Sb" 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".
>>
> 
> That's how I understood Lennart's excerpt I was referring to previously.
> 

Hmm ... I tested on SLES11 and indeed, while "insserv a" will not enable
"b" it will refuse to enable "a" if "b" is not enabled. And conversely
it will not disable "b" if "a" is enabled.

So at least it tries to ensure that set of enabled services is consistent.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-03-08 Thread Francis Moreau
On Tue, Mar 8, 2016 at 9:23 AM, Andrei Borzenkov  wrote:
> 08.03.2016 11:07, Francis Moreau пишет:
>> On Tue, Mar 8, 2016 at 7:51 AM, Andrei Borzenkov  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  
 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 Sa *and* Sb" 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".
>

That's how I understood Lennart's excerpt I was referring to previously.

-- 
Francis
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-03-08 Thread Andrei Borzenkov
08.03.2016 11:07, Francis Moreau пишет:
> On Tue, Mar 8, 2016 at 7:51 AM, Andrei Borzenkov  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  
>>> 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 Sa *and* Sb" 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 Sa only)
>  - systemd will only start a
> 

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


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

2016-03-08 Thread Francis Moreau
On Tue, Mar 8, 2016 at 7:51 AM, Andrei Borzenkov  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  
>> 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 Sa *and* Sb" with yy < xx)
 - init will start *both* a and b

However with systemd and 'b' being a native unit:

 - insserv a (this will create Sa only)
 - systemd will only start a

-- 
Francis
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel