On Wed, 04.02.15 10:08, Martin Pitt (martin.p...@ubuntu.com) wrote:

> Hello all,
> 
> a little while ago, Jon Severinsson wrote a sysv generator
> optimization to not go through all the parsing of init.d scripts and
> creation of units if there already is a native unit for that name. As
> they are put into generator.late they would be ignored anyway.

Well, but their enablement status so far is not ignored. i.e. if you
drop in a unit file, as well as a sysv script, and the latter is
enabled, but the former not, then systemd currently reads that so that
the sysv one is overriden by the native one, and the native one is
considered enabled.

With this change you alter that behaviour. Is that really desired? 

(Not saying it wasn't desired, just pointing out the difference, and
asking for some consideration of this issue?)

> This is particularly relevant if you have lots of init.d scripts, like
> we have on Debian. Other than that it's not a behaviour change AFAICS.
> 
> I cleaned it up a bit and added a test case.
> 
> One thing I wonder about is whether native_unit_exists() should
> perhaps be moved into src/shared/? It might be useful for other stuff.

We have similar code in src/shared/install.c already, this should
really be unified...

I must say I kinda like the fact though that the sysv generator knows
nothing about native units so far...

Anyway, not totally opposed, but I'd like to hear some analysis first
why this change in behaviour does not matter.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to