r189 - vdr/vdr/trunk/debian
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 27 Feb 2005 13:00:07 +0100
Author: tschmidt
Date: 2005-02-27 13:00:06 +0100 (Sun, 27 Feb 2005)
New Revision: 189
Modified:
vdr/vdr/trunk/debian/vdr.postinst
Log:
Try to stop vdr a second time in postinst when upgrading from a version < 1.2.6-9
Modified: vdr/vdr/trunk/debian/vdr.postinst
===================================================================
--- vdr/vdr/trunk/debian/vdr.postinst 2005-02-27 11:51:52 UTC (rev 188)
+++ vdr/vdr/trunk/debian/vdr.postinst 2005-02-27 12:00:06 UTC (rev 189)
@@ -31,6 +31,23 @@
. /usr/share/debconf/confmodule
+ # Try to stop vdr a second time when we are upgrading
+ # from a version smaller 1.2.6-9, because the init-script
+ # of the old version can not stop vdr without a existing
+ # /usr/bin/vdr
+ if [ ! -z $2 ]; then
+ if `dpkg --compare-versions $2 lt 1.2.6-9`; then
+ if [ -x "/etc/init.d/vdr" ]; then
+ update-rc.d vdr defaults >/dev/null
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d vdr stop || exit 0
+ else
+ /etc/init.d/vdr stop || exit 0
+ fi
+ fi
+ fi
+ fi
+
# move cfg-files from /etc/vdr to /var/lib/vdr
for FILE in remote.conf setup.conf timers.conf; do
if [ -e /etc/vdr/$FILE ] && [ ! -e /var/lib/vdr/$FILE ]; then