Bug 87320

Summary: RFE: "systemctl" has no forwarding glue for Debian's update-rc.d for Sysv scripts, but probably should have it
Product: systemd Reporter: tiposchi
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: martin.pitt
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description tiposchi 2014-12-15 09:46:18 UTC
The bug has been reported in debian as well.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751638


Basically running

# systemctl is-enabled postfix
Failed to get unit file state for postfix.service: No such file or directory

So it is not possible for me to know if a sysvinit service is enabled or not.
Comment 1 Lennart Poettering 2015-02-03 18:37:38 UTC
Currently, when we detect that a sysv service is to be modified we forward any requests to "chkconfig" as fallback. THis works corerctly on RH derived distros, but Debian doesn't have chkconfig, it has update-rc.d instead. I'd be willing to merge a patch that makes systemctl invoke that as fallback, instead. However, we'd need at patch from the Debian folks for this.
Comment 2 Martin Pitt 2015-02-27 05:24:54 UTC
The sysv-generator already figures out whether an init.d script is enabled or not, and generates the corresponding runlevel?.target.wants symlinks (or in master, {multi-user,graphical}.target.wants, but that's not relevant for this bug). So we could know this without having to ask chkconfig/update-rc.d.
Comment 3 Martin Pitt 2015-05-29 06:43:39 UTC
This became obsolete with http://cgit.freedesktop.org/systemd/systemd/commit/?id=0f0467e63b0e068

Distros/Debian can now implement this check in their systemd-sysv-install script (I'm just doing so now).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.