[Pkg-fglrx-devel] r281 - fglrx-driver/trunk/debian
Patrick Matthäi
pmatthaei at alioth.debian.org
Tue Aug 25 16:30:27 UTC 2009
Author: pmatthaei
Date: 2009-08-25 16:30:27 +0000 (Tue, 25 Aug 2009)
New Revision: 281
Added:
fglrx-driver/trunk/debian/fglrx-atieventsd.preinst
Modified:
fglrx-driver/trunk/debian/changelog
Log:
* Remove deprecated conffile /etc/init.d/fglrx-driver, so insserv is happy.
Closes: #543384
Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog 2009-08-25 16:18:40 UTC (rev 280)
+++ fglrx-driver/trunk/debian/changelog 2009-08-25 16:30:27 UTC (rev 281)
@@ -7,8 +7,10 @@
* Add acpid to recommends of fglrx-atieventsd, it is mostly useless without
the acpi daemon.
* Remove all hackish diversion handlings.
+ * Remove deprecated conffile /etc/init.d/fglrx-driver, so insserv is happy.
+ Closes: #543384
- -- Patrick Matthäi <pmatthaei at debian.org> Tue, 25 Aug 2009 18:18:16 +0200
+ -- Patrick Matthäi <pmatthaei at debian.org> Tue, 25 Aug 2009 18:29:39 +0200
fglrx-driver (1:9-8-1) unstable; urgency=high
Added: fglrx-driver/trunk/debian/fglrx-atieventsd.preinst
===================================================================
--- fglrx-driver/trunk/debian/fglrx-atieventsd.preinst (rev 0)
+++ fglrx-driver/trunk/debian/fglrx-atieventsd.preinst 2009-08-25 16:30:27 UTC (rev 281)
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+# Remove a no-longer used conffile
+rm_conffile() {
+ local PKGNAME="$1"
+ local CONFFILE="$2"
+
+ [ -e "$CONFFILE" ] || return 0
+
+ local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+ local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
+ sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+ if [ "$md5sum" != "$old_md5sum" ]; then
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-bak ..."
+ mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+ else
+ echo "Removing obsolete conffile $CONFFILE ..."
+ rm -f "$CONFFILE"
+ fi
+}
+
+case "$1" in
+ install|upgrade)
+ if dpkg --compare-versions "$2" le "1:9-8-2"; then
+ rm_conffile fglrx-atieventsd "/etc/init.d/fglrx-driver"
+ fi
+esac
+
+#DEBHELPER#
More information about the Pkg-fglrx-devel
mailing list