]> err.no Git - systemd/commitdiff
Move diversion removal from postinst to preinst. Closes: #679728
authorTollef Fog Heen <tfheen@err.no>
Sun, 1 Jul 2012 06:23:34 +0000 (08:23 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sun, 1 Jul 2012 06:23:34 +0000 (08:23 +0200)
debian/changelog
debian/systemd.postinst
debian/systemd.preinst [new file with mode: 0644]

index 535d27a9811559362b0e1c2740dcf336fb23a875..efcedea6d405e56f0f0ce5ad751384bf83b85838 100644 (file)
@@ -1,3 +1,9 @@
+systemd (44-4) unstable; urgency=low
+
+  * Move diversion removal from postinst to preinst.  Closes: #679728
+
+ -- Tollef Fog Heen <tfheen@debian.org>  Sun, 01 Jul 2012 08:17:50 +0200
+
 systemd (44-3) unstable; urgency=low
 
   [ Michael Biebl ]
index 778f60b4092d7aef25b405295a498c8db8788efb..366f7f545cfc002160f9821c00777dc442402255 100644 (file)
@@ -59,12 +59,6 @@ if dpkg --compare-versions "$2" lt "40-1"; then
     fi
 fi
 
-if [ "$1" = "configure" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "44-3"; then
-    rm -f /lib/lsb/init-functions
-    dpkg-divert --remove --package systemd --rename \
-        --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
-fi
-
 systemd-machine-id-setup
 
 #DEBHELPER#
diff --git a/debian/systemd.preinst b/debian/systemd.preinst
new file mode 100644 (file)
index 0000000..22b4e36
--- /dev/null
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ] && [ -n "$2" ] && dpkg --compare-versions "$2" lt "44-3"; then
+    rm -f /lib/lsb/init-functions
+    dpkg-divert --remove --package systemd --rename \
+        --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
+fi
+
+#DEBHELPER#