From: Tollef Fog Heen Date: Sun, 1 Jul 2012 06:23:34 +0000 (+0200) Subject: Move diversion removal from postinst to preinst. Closes: #679728 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1394b97d989c7ae9e683774e6ae2cf7a3d65ed14;p=systemd Move diversion removal from postinst to preinst. Closes: #679728 --- diff --git a/debian/changelog b/debian/changelog index 535d27a9..efcedea6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +systemd (44-4) unstable; urgency=low + + * Move diversion removal from postinst to preinst. Closes: #679728 + + -- Tollef Fog Heen Sun, 01 Jul 2012 08:17:50 +0200 + systemd (44-3) unstable; urgency=low [ Michael Biebl ] diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 778f60b4..366f7f54 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -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 index 00000000..22b4e362 --- /dev/null +++ b/debian/systemd.preinst @@ -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#