[systemd-devel] sysv-generator: doesn't handle /etc/insserv/overrides or /etc/chkconfig.d

Lennart Poettering lennart at poettering.net
Mon Feb 16 04:59:44 PST 2015


On Mon, 16.02.15 12:25, Christian Seiler (christian at iwakd.de) wrote:

> Hi,
> 
> >>Would you accept a patch that makes the sysv-generator consider these
> >>local overrides? (I have a test patch just for insserv/overrides
> >>that's diffstat +14 -8; for chkconfig.d it would be a bit more longer,
> >>because you can override individual settings there (and not just all
> >>of them at once), but shouldn't be too complicated.
> >
> >We currently have support for calling out to chkconfig, but zero
> >support for calling out to update-rcd or insserv. It would be weird
> >supporting some facilities they provide without supporting the tools
> >themsevles...
> >
> >This is also the first time I hear about chkconfig.d, which is kinda
> >interesting, given that the transition on Fedora is already years
> >past... We never got any request for it to be supported
> >explicitly. Which makes me wonder if it really makes sense to support
> >this now.
> >
> >So, I am pretty conservative about this. That said I am note entirely
> >sure what precisely the patch you propose would entail. What precisely
> >would it do? Just look for init scripts in some other place in
> >addition to /etc/rc.d?
> 
> So this would definitely NOT call out to anything at all, this is just
> about the possibility to override headers (LSB or chkconfig ones) in
> init scripts.
> 
> Basically, you have the following semantics
> 
>  - insserv (SuSE/Debian), when it processes /etc/init.d/$NAME, it also
>    looks for /etc/insserv/overrides/$NAME. If the latter exists, it
>    reads the LSB headers (but ONLY the LSB headers) from that file and
>    completely ignores the LSB headers in /etc/init.d/$NAME (i.e. that
>    file is not parsed at all). But the script called is still the
>    original /etc/init.d/$NAME.
> 
>  - chkconfig (Fedora, RHEL, ...), when it processes /etc/init.d/$NAME,
>    it also looks for /etc/chkconfig.d/$NAME. If the latter exists,
>    every header set in that file overrides the corresponding header in
>    the original init script (but the original init script is still
>    read).

Well, if this is really just about overriding the LSB headers, and
nobody so far ever asked for this functionality, wouldn't it be a
better and easier way out to just recommend people to do systemd-style
drop-ins? I mean, those also work on units generated by the sysv
generator...

> You couldn't override init scripts that way - if you wanted to do that,
> you'd have to replace them completely. But if you just want to alter
> (or even specify for the first time for certain third-party scripts)
> dependency information but keep getting updates for the init script
> from the software vendor, this was really, really useful.

Since I never heard anyone asking for this, I doubt it was really that
useful in real life...

> Note that on servers running Debian I've used /etc/insserv/overrides
> countless times over the past years, so maybe chkconfig.d wasn't
> something that was widely popularized, but insserv/overrides definitely
> was.

Again given that on DEbian we don't even have hookup to
insserv/update-rcd, I kinda wonder if it would be appropriate to
support this facet of it, without supporting the actual core bit.

I also believ that "systemctl edit" is a much nicer interface for all
of this, and it works on both sysv scripts and unit files...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list