Bug#971713: sysstat: init or systemd file has overlapping runlevels

Trek trek00 at inbox.ru
Sun Dec 13 18:44:01 GMT 2020


On Sun, 13 Dec 2020 11:03:57 +0100
Robert Luberda <robert at debian.org> wrote:

> sysstat's init.d has the following lines in /etc/init.d/sysstat
> # Default-Start:     2 3 4 5
> # Default-Stop:
> I'm not sure how empty Default-Stop is interpreted, so I've just tried

it seems to me that on empty Default-Stop the runlevels will be copied
from Default-Start, but this is not an issue, just to better understand


> to change it to:
> # Default-Stop:     0 1 6

this seems correct


> As a result insserv displays two warnings instead of one:

before explaining the error messages, remember that init scripts and
their links are configuration files, like (almost) everything else
under /etc


> insserv: warning: current stop runlevel(s) (empty) of script `sysstat'
> overrides LSB defaults (0 1 6).

it is saying that the current stop runlevels (the /etc/rc*.d/*sysstat
links) are overriding the ones described by the LSB header (inside
the /etc/init.d/sysstat script)


> insserv: Script ssh has overlapping Default-Start and Default-Stop
> runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.

the end result is that the rc*.d links are unchanged and the runlevels
still inconsistent


> As a maintainer of sysstat I have no idea what else I can do to fix
> the warning. It seems to me there is some bug in insserv. As the bug
> affects my package, and  according to the bug report "any package
> that has init.d file", I'm setting severity of this report to grave.

on new installations, simply adding the correct levels (0 1 6) to the
script should fix the bug, but to fix on upgrades you should remove
those links before running insserv, that is adding something like that
to postinst inside the configure step:

  # new Default-Stop (see #971713)
  if dpkg --compare-versions "$2" le '12.4.0-2'; then
     update-rc.d -f sysstat remove
  fi

this will also remove any tweaking done by user, that should be
annotated inside the NEWS.Debian file

I would like to provide you a patch, but I can't find where the init.d
file is enabled inside the sysstat postinst, that should be:

  update-rc.d sysstat defaults

ciao!



More information about the Debian-init-diversity mailing list