[systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
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. I'll cook a patch for this. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
Hey Lennart, Lennart Poettering [2015-05-27 15:08 +0200]: /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? My current version of the patch keeps the chkconfig implementation for now; I suppose we don't want to needlessly enforce a lockstep situation where you can't use systemd git on Fedora until these scripts exist. LSB does not define an interface for checking whether an init.d script is enabled, and e. g. Debian's update-rc.d does not currently either (https://bugs.debian.org/705254). We certainly know whether an init.d script is enabled, as we check exactly that in the sysv-generator (and if it's disabled we don't create a .service for it). However, right now the systemctl is-enabled command will just give you a not supported with sysvinit error with --disable-chkconfig. Also, I'd like to keep Lukas Nykryn in the loop on this, our initscripts maintainer. Did you mean to CC: him? Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
On Wed, 27.05.15 13:00, Martin Pitt (martin.p...@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 -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
On Wed, 27.05.15 15:17, Martin Pitt (martin.p...@ubuntu.com) wrote: Hey Lennart, Lennart Poettering [2015-05-27 15:08 +0200]: /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? My current version of the patch keeps the chkconfig implementation for now; I suppose we don't want to needlessly enforce a lockstep situation where you can't use systemd git on Fedora until these scripts exist. We barely have any init scripts left, this isn't really a big issue hence. I think it's no problem to require an update in lockstep for this for Fedora. LSB does not define an interface for checking whether an init.d script is enabled, and e. g. Debian's update-rc.d does not currently either (https://bugs.debian.org/705254). We certainly know whether an init.d script is enabled, as we check exactly that in the sysv-generator (and if it's disabled we don't create a .service for it). However, right now the systemctl is-enabled command will just give you a not supported with sysvinit error with --disable-chkconfig. I think it should be the hook that generates that error, not systemctl... Also, I'd like to keep Lukas Nykryn in the loop on this, our initscripts maintainer. Did you mean to CC: him? That was my intention, and I could bet I did add him. Lukas, I added you now, can you have a look at branch of the thread please? Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
Lennart Poettering píše v St 27. 05. 2015 v 15:22 +0200: On Wed, 27.05.15 15:17, Martin Pitt (martin.p...@ubuntu.com) wrote: Hey Lennart, Lennart Poettering [2015-05-27 15:08 +0200]: /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? My current version of the patch keeps the chkconfig implementation for now; I suppose we don't want to needlessly enforce a lockstep situation where you can't use systemd git on Fedora until these scripts exist. We barely have any init scripts left, this isn't really a big issue hence. I think it's no problem to require an update in lockstep for this for Fedora. LSB does not define an interface for checking whether an init.d script is enabled, and e. g. Debian's update-rc.d does not currently either (https://bugs.debian.org/705254). We certainly know whether an init.d script is enabled, as we check exactly that in the sysv-generator (and if it's disabled we don't create a .service for it). However, right now the systemctl is-enabled command will just give you a not supported with sysvinit error with --disable-chkconfig. I think it should be the hook that generates that error, not systemctl... Also, I'd like to keep Lukas Nykryn in the loop on this, our initscripts maintainer. Did you mean to CC: him? That was my intention, and I could bet I did add him. Lukas, I added you now, can you have a look at branch of the thread please? Lennart We already have /usr/lib/lsb/install_initd in fedora and rhel, it is in redhat-lsb-core, but basically it is just a symlink to chkconfig. But I would be careful about it. The main problem is, that according to LSB install_initd requires that lsb dependencies are satisfied and refuses to install an initscript if they are not. Lukas ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
Martin Pitt píše v St 27. 05. 2015 v 17:45 +0200: Hey Lukáš, Lukáš Nykrýn [2015-05-27 17:32 +0200]: We already have /usr/lib/lsb/install_initd in fedora and rhel, it is in redhat-lsb-core, but basically it is just a symlink to chkconfig. Ah, that's not technically correct, as /usr/lib/lsb/{install,remove}_initd have a different CLI. In that case our chkconfig behaves differently: https://git.fedorahosted.org/cgit/chkconfig.git/tree/chkconfig.c#n683 But anyway, this is moot. We won't call those from systemd after all, but instead introduce /usr/lib/systemd/systemd-sysv-install. Yep it probably make sense, in fedora we can do it as yet another alias for chkconfig. Thanks! Martin Lukas ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] abstracting chkconfig vs. update-rc.d [was: non-merged /usr changes]
Hey Lukáš, Lukáš Nykrýn [2015-05-27 17:32 +0200]: We already have /usr/lib/lsb/install_initd in fedora and rhel, it is in redhat-lsb-core, but basically it is just a symlink to chkconfig. Ah, that's not technically correct, as /usr/lib/lsb/{install,remove}_initd have a different CLI. But anyway, this is moot. We won't call those from systemd after all, but instead introduce /usr/lib/systemd/systemd-sysv-install. Thanks! Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel