From: Tollef Fog Heen Date: Sat, 30 Jun 2012 18:14:42 +0000 (+0200) Subject: Ship lsb init script override/integration in /lib/lsb/init-functions.d X-Git-Tag: 44-3~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27bb26a30a0887df4f12ddbede699bffed373322;p=systemd Ship lsb init script override/integration in /lib/lsb/init-functions.d Do this rather than diverting /lib/lsb/init-functions itself. Add appropriate Breaks to ensure upgrades happen. --- diff --git a/debian/changelog b/debian/changelog index e1a2cecc..30068326 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 29 Jun 2012 22:34:16 +0200 diff --git a/debian/control b/debian/control index 81c93991..33717aab 100644 --- a/debian/control +++ b/debian/control @@ -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 diff --git a/debian/init-functions b/debian/init-functions.d/40-systemd similarity index 100% rename from debian/init-functions rename to debian/init-functions.d/40-systemd diff --git a/debian/systemd.install b/debian/systemd.install index f4916ba0..102e3f24 100644 --- a/debian/systemd.install +++ b/debian/systemd.install @@ -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 diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 366f7f54..778f60b4 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -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 index c7fe8a60..00000000 --- a/debian/systemd.postrm +++ /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 index 0e8d30d0..00000000 --- a/debian/systemd.preinst +++ /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