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

Giuseppe Iuculano giuseppe at iuculano.it
Sun May 3 09:15:41 UTC 2009


The following commit has been merged in the master branch:
commit 734f494028d6947ddc2a60a95f83e9936b0dedd7
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date:   Sun May 3 11:14:12 2009 +0200

    Rewrited debian/postinst, now it is more readable

diff --git a/debian/postinst b/debian/postinst
index 63f498c..b595b89 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -3,17 +3,18 @@
 set -e
 
 if [ "$1" = upgrade ]; then
-	if dpkg --compare-versions "$2" lt-nl "2.0.21.1-1" ; 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"
+			md5sum=$(md5sum /etc/modprobe.d/dkms | sed -e 's/ .*//')
+			old_md5sum=$(dpkg-query -W -f='${Conffiles}' dkms | \
+				sed -n -e "\' /etc/modprobe.d/dkms ' { s/ obsolete$//; s/.* //; p }")
+			if [ "$md5sum" = "$old_md5sum" ]; then
+				rm -f /etc/modprobe.d/dkms
+			else
+				echo "Moving /etc/modprobe.d/dkms to /etc/modprobe.d/dkms.conf"
+				grep -v '^#' /etc/modprobe.d/dkms >> /etc/modprobe.d/dkms.conf
+				rm -f /etc/modprobe.d/dkms
 			fi
-		else
-			echo "Moving /etc/modprobe.d/dkms to /etc/modprobe.d/dkms.conf"
-			grep -v '^#' /etc/modprobe.d/dkms >> /etc/modprobe.d/dkms.conf
-			rm -f "/etc/modprobe.d/dkms"
 		fi
 	fi
 fi

-- 
Maintainance of the dkms package



More information about the Pkg-dkms-commits mailing list