On Mon, 14 Dec 2020 03:54:28 +0100
Lorenzo <plore...@disroot.org> wrote:

> if you are searching in the source under /debian directory, the code
> that you are looking for will be written by dh-installinit in place of
> the #DEBHEPLER# placeholder, during the build of the package.

@Lorenzo oh yeah, many thanks :)

so the fix would be like the one attached to this mail

but reading the init.d script I see that it does not stop anything, so
an empty Default-Stop should be correct

what I really don't understand now it's from where those messages come
from:

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

running insserv on a script with an empty Default-Stop field does not
print this message, at least with buster and sid versions

reading the source, it could set an empty Default-Stop to the value of
Default-Start, but only when compiled with the -DSUSE flag enabled:

  https://sources.debian.org/src/insserv/1.21.0-1/insserv.c/#L3727

and this flag is not enabled on debian builds


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

this instead comes from ssh, that have an empty Default-Stop too

@Robert Luberda: I ran out of ideas, your script was correct with an
empty Default-Stop field, like the ssh one!

Actually I'm running a buster installation, but using the sid insserv
binary it does not show this issue, so I can't debug further for now

ciao!
diff --git a/debian/sysstat.postinst b/debian/sysstat.postinst
index f4730d0..3ea1596 100644
--- a/debian/sysstat.postinst
+++ b/debian/sysstat.postinst
@@ -114,6 +114,11 @@ if [ "$1" = "configure" ] ; then
                             --slave /usr/share/man/man1/sar.1.gz sar.1.gz \
                             /usr/share/man/man1/sar.sysstat.1.gz
     fi
+
+    # new Default-Stop (see #971713)
+    if dpkg --compare-versions "$2" le '12.4.1-2'; then
+        update-rc.d -f sysstat remove
+    fi
 fi
 
 #DEBHELPER#

Reply via email to