[systemd-devel] How do I disable old init.d scripts?

Paul Menzel paulepanter at users.sourceforge.net
Mon Jun 25 12:33:21 PDT 2012


Am Montag, den 25.06.2012, 15:38 +0200 schrieb Lennart Poettering:
> On Mon, 25.06.12 15:25, Paul Menzel wrote:

[…]

> > how can I disable init.d scripts which systemd loads for compatibility
> > reasons?
> > 
> >         $ ls /etc/init.d/motd  (or any other init.d script)
> >         /etc/init.d/motd
> >         $ systemd-analyze blame | grep motd
> >            543ms motd.service
> >         $ sudo systemctl disable motd.service
> >         Failed to issue method call: No such file or directory
> 
> On Fedora we defer to chkconfig automatically for sysv services.

Looking at the code

    $ git grep -i chkconfig

this seems to happen for the following distributions.

        #if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_MEEGO) || defined(TARGET_ALTLINUX) || defined(TARGET_MAGEIA))

> This hookup is currently missing for Debian, but I'd be willing to merge a
> patch for that.

If I am not mistaken, Debian uses `update-rc.d` for that purpose.

Does someone know if it is feasible to just change the one variable (and
options) containing the path to the utilities and reuse the error
handling or will that not work?


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120625/3da72c3c/attachment.pgp>


More information about the systemd-devel mailing list