Mask systemd service in postinst if START_IODINED is not set to true.
authorgregor herrmann <gregoa@debian.org>
Sun, 7 Aug 2016 18:20:04 +0000 (20:20 +0200)
committergregor herrmann <gregoa@debian.org>
Sun, 7 Aug 2016 18:20:04 +0000 (20:20 +0200)
This is the replacement for the check in the service file itself.

debian/postinst

index 3591e219c61b2756a289bc11d3fd775781a54d94..45ffaee3411c6bf10c206a9f16ae7ac5d4babd1b 100644 (file)
@@ -90,4 +90,12 @@ db_stop;
 
 #DEBHELPER#
 
+# mask iodined.service if START_IODINED is not set to true
+# this mimicks the behaviour of sysvinit. cf. #832599
+if [ "$1" = "configure" ] ; then
+    if [ "$START_IODINED" != "true" ] ; then
+        deb-systemd-helper mask iodined.service >/dev/null || true
+    fi
+fi
+
 exit 0