[systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]

Lennart Poettering lennart at poettering.net
Wed May 27 06:08:38 PDT 2015

On Wed, 27.05.15 13:00, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Lennart Poettering [2015-05-26 18:36 +0200]:
> > That said, I think even better would be to maybe make the support for
> > this generic in systemctl: instead of explicitly invoking chkconfig or
> > update-rcd, maybe we can just make systemctl invoke some fixed binary
> > /usr/lib/systemd/systemd-sysv-compat or so with a fixed set of
> > parameters. The distros could then make that a tool (maybe just a
> > shell script) that invokes chkconfig or update-rc.d This would then
> > allow us to remove any chkconfig-specific code from systemd, and would
> > allow all distros to plug-in the tool of their choice without having
> > to patch upstream. What do you think?
> I just stumbled over
>   http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/initsrcinstrm.html
> which specifies pretty much what we talked about above:
>   /usr/lib/lsb/install_initd /etc/init.d/example.com-coffeed
>   /usr/lib/lsb/remove_initd /etc/init.d/example.com-coffeed
> So we could make systemctl just call this if it's available, and
> otherwise do nothing for init.d scripts.

Sounds OK to use something like this, that already exists.

However, we actually need not only enabling/disabling, but also
"is-enabled" support, and idea on that?

Also, I'd like to keep Lukas Nykryn in the loop on this, our
initscripts maintainer. 

Lukas, any opinion on this? If we remove chkconfig support from
systemctl and replace it with generic install_initd/remove_initd
support, would you be willing to add the two necessary scripts to
Fedora's initscripts package?


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list