]> err.no Git - systemd/commitdiff
Ship lsb init script override/integration in /lib/lsb/init-functions.d
authorTollef Fog Heen <tfheen@err.no>
Sat, 30 Jun 2012 18:14:42 +0000 (20:14 +0200)
committerTollef Fog Heen <tfheen@err.no>
Sat, 30 Jun 2012 18:25:16 +0000 (20:25 +0200)
Do this rather than diverting /lib/lsb/init-functions itself.  Add
appropriate Breaks to ensure upgrades happen.

debian/changelog
debian/control
debian/init-functions.d/40-systemd [moved from debian/init-functions with 100% similarity]
debian/systemd.install
debian/systemd.postinst
debian/systemd.postrm [deleted file]
debian/systemd.preinst [deleted file]

index e1a2cecc6d73762be8f12c1d389a80ca14ac3dba..30068326f5b4c4c97f4d2680eff6a538a8522e19 100644 (file)
@@ -7,6 +7,9 @@ systemd (44-3) UNRELEASED; urgency=low
   [ Tollef Fog Heen ]
   * Cherry-pick d384c7 from upstream to stop journald from leaking
     memory.  Thanks to Andreas Henriksson for testing.  Closes: #677701
+  * Ship lsb init script override/integration in /lib/lsb/init-functions.d
+    rather than diverting /lib/lsb/init-functions itself.  Add appropriate
+    Breaks to ensure upgrades happen.
 
  -- Tollef Fog Heen <tfheen@debian.org>  Fri, 29 Jun 2012 22:34:16 +0200
 
index 81c9399168333abb9db4b58e5ea3404ee659181b..33717aab84c240e9e8b41015162f3af41d001c4b 100644 (file)
@@ -42,7 +42,7 @@ Recommends: libpam-systemd
 Suggests: systemd-gui, python, python-dbus, python-cairo
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.19.1-2), initscripts (>= 2.88dsf-17), udev
-Breaks: lvm2 (<< 2.02.84-1)
+Breaks: lvm2 (<< 2.02.84-1), lsb-base (<< 4.1+Debian4)
 Conflicts: klogd
 Description: system and service manager
  systemd is a replacement for sysvinit.  It is dependency-based and
index f4916ba06542f849c1ec2a608486ec57dc4e0adb..102e3f24d49e7379311f3102a6fbc68e39002ae1 100644 (file)
@@ -41,7 +41,7 @@ usr/lib/sysctl.d
 usr/lib/systemd
 usr/lib/*/systemd
 usr/lib/tmpfiles.d
-debian/init-functions lib/lsb
+debian/init-functions.d/40-systemd /lib/lsb/init-functions.d
 debian/debian-fixup lib/systemd/
 debian/debian-fixup.service lib/systemd/system
 debian/tmpfiles.d/debian.conf usr/lib/tmpfiles.d
index 366f7f545cfc002160f9821c00777dc442402255..778f60b4092d7aef25b405295a498c8db8788efb 100644 (file)
@@ -59,6 +59,12 @@ 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.postrm b/debian/systemd.postrm
deleted file mode 100644 (file)
index c7fe8a6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ "$1" = remove ] || [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 25-1; then
-    dpkg-divert --remove --package systemd --rename \
-        --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
-fi
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/systemd.preinst b/debian/systemd.preinst
deleted file mode 100644 (file)
index 0e8d30d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ "$1" = install ] || [ "$1" = upgrade ]; then
-    dpkg-divert --add --package systemd --rename \
-        --divert /lib/lsb/init-functions.systemd /lib/lsb/init-functions
-fi
-
-#DEBHELPER#
-
-exit 0