Please call insserv on package installation

Martin Pitt mpitt at debian.org
Wed Jul 13 11:47:27 BST 2016


Control: tag -1 patch

Hello again,

Martin Pitt [2016-07-13 12:34 +0200]:
> The only thing missing is that installing insserv (usually via
> sysvinit-core) should recompute the link priorities, to get away from
> the fixed "01" ones from the update-rc.d fallback. This should be as
> simple as calling "insserv" in insserv's postinst, at least on new
> installs [ -z "$2" ]. I tested this with a few packages and that
> nicely fixes up the priorities.

Tested debdiff attached. As per the LowNMU flag I'd like to upload it
this week, but I'll wait a day or two in case you want to comment.

The "|| true" is deliberate -- if insserv fails because of some broken
third-party LSB init script headers then that's not a reason to break
the installation of insserv IMHO. (Later packages might still fail to
install of course.)

Thanks!

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
diff -Nru insserv-1.14.0/debian/changelog insserv-1.14.0/debian/changelog
--- insserv-1.14.0/debian/changelog	2016-02-23 01:22:09.000000000 +0100
+++ insserv-1.14.0/debian/changelog	2016-07-13 12:42:13.000000000 +0200
@@ -1,3 +1,12 @@
+insserv (1.14.0-5.4) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add debian/postinst: Run insserv after package installation, to fix up the
+    rc?.d priorities from the dumb update-rc.d fallback (which uses priority
+    01 for everything). (Closes: #830963)
+
+ -- Martin Pitt <martin.pitt at ubuntu.com>  Wed, 13 Jul 2016 12:40:50 +0200
+
 insserv (1.14.0-5.3) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru insserv-1.14.0/debian/postinst insserv-1.14.0/debian/postinst
--- insserv-1.14.0/debian/postinst	1970-01-01 01:00:00.000000000 +0100
+++ insserv-1.14.0/debian/postinst	2016-07-13 12:39:52.000000000 +0200
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+# When installing insserv (usually via sysvinit-core) on an existing system,
+# fix up the rc?.d priorities from the dumb update-rc.d fallback (which uses
+# priority 01 for everything).
+if [ "$1" = "configure" ] && [ -z "$2" ]; then
+    /sbin/insserv || true
+fi


More information about the Pkg-systemd-maintainers mailing list