From 3890472c9bb1e290e6438e8b43df2c505a0ea79d Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Sat, 7 Mar 2015 12:30:41 +0100 Subject: Add samba.preinst to temporarily deactivate the old qtsmbstatusd initscript --- debian/changelog | 9 +++++++++ debian/samba.preinst | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 debian/samba.preinst (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 40abb9c028..b44ce231c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +samba (2:4.1.17+dfsg-2) UNRELEASED; urgency=medium + + * Add samba.preinst to temporarily deactivate the old qtsmbstatusd + initscript which has dependencies incompatible with the new samba + initscript. This will ensure a clean upgrade path for samba if the + qtsmbstatus-server package was installed previously. (Closes: #779666) + + -- Andreas Beckmann Wed, 04 Mar 2015 12:12:57 +0100 + samba (2:4.1.17+dfsg-1) unstable; urgency=high * New upstream release. Fixes: diff --git a/debian/samba.preinst b/debian/samba.preinst new file mode 100644 index 0000000000..ae8cfaac92 --- /dev/null +++ b/debian/samba.preinst @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +# Deactivate the old qtsmbstatusd initscript that has dependencies +# incompatible with the new samba initscript. This will allow to +# configure the new samba package and qtsmbstatus-server afterwards. +if [ "$1" = "upgrade" ] || [ "$1" = "install" ]; then + if [ -x "/etc/init.d/qtsmbstatusd" ]; then + version=$(dpkg-query -f '${Config-Version} ${Version}' -W qtsmbstatus-server 2>/dev/null | awk '{ print $1 }') + if dpkg --compare-versions "$version" lt-nl "2.2.1-3~" ; then + echo "Deactivating qtsmbstatusd temporarily..." + invoke-rc.d qtsmbstatusd stop + update-rc.d -f qtsmbstatusd remove + fi + fi +fi + +#DEBHELPER# -- cgit v1.2.3