[Pkg-dkms-commits] [SCM] Maintainance of the dkms package branch, master, updated. debian/2.0.21.0-1-17-g3fac4cc

Giuseppe Iuculano giuseppe at iuculano.it
Fri Apr 24 15:15:28 UTC 2009


The following commit has been merged in the master branch:
commit 3fac4cce57f7af85c8f652c17c790063d9acd46b
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date:   Fri Apr 24 17:15:20 2009 +0200

    debian/postinst: Remove /etc/modprobe.d/dkms on upgrade only if unmodified

diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..d3955ac
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = upgrade ]; then
+	if dpkg --compare-versions "$2" lt-nl "2.0.21.1-1" ; then
+		if [ -e "/etc/modprobe.d/dkms" ]; then
+			if [ "`md5sum \"/etc/modprobe.d/dkms\" | sed -e \"s/ .*//\"`" = \
+				"`dpkg-query -W -f='${Conffiles}' dkms | sed -n -e \"\\\\' /etc/modprobe.d/dkms's/.* //p\"`" ]
+			then
+				rm -f "/etc/modprobe.d/dkms"
+			fi
+		fi
+	fi
+fi
+
+#DEBHELPER#

-- 
Maintainance of the dkms package



More information about the Pkg-dkms-commits mailing list