[Pkg-systemd-maintainers] Bug#714903: masking removed but not purged SysV/LSB services

Michael Biebl biebl at debian.org
Thu Jul 4 07:42:05 BST 2013


Package: dh-systemd
Version: 1.4
Severity: normal

If a package ships both a SysV init script and systemd service, systemd
will prefer the native .service over the init script.

The .service files are shipped in /lib/systemd/system, the init scripts
in /etc/init.d. This means, they are marked as conffiles and only
removed on "purge", whereas the .service files are removed on "remove".

E.g. this leads to:

$ systemctl status rsyslog.service 
rsyslog.service - LSB: enhanced syslogd
   Loaded: loaded (/etc/init.d/rsyslog)
   Active: active (exited) since Do 2013-07-04 08:24:40 CEST; 1min 45s ago
  Process: 597 ExecStart=/etc/init.d/rsyslog start (code=exited, status=0/SUCCESS)

when the rsyslog package has been removed, but not purged.
SysV/LSB init scripts will be started on boot for such
removed but not purged packages. Those init scripts usually have a
"[ -x /usr/bin/mydaemon ] || exit 0" check which make them a no-op in
such a case.

Still, I think this behaviour is unfortunate.
For once, we pointlessly spawn a shell script which simply does nothing,
wasting CPU cycles.
But more importantly, such services show up in systemctl output as
"active (exited)", while they are not really active.
This could be confusing for users.

We might consider to mask such SysV/LSB services on "remove" and remove
the mask on "purge".

Discuss!


Michael


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.9-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dh-systemd depends on:
ii  debhelper  9.20130630
ii  perl       5.14.2-21

dh-systemd recommends no packages.

dh-systemd suggests no packages.

-- no debconf information




More information about the Pkg-systemd-maintainers mailing list