The following commit has been merged in the master branch:
commit 508c115bf13930374a660214038f8c3fa3e7a29f
Author: Giuseppe Iuculano <[email protected]>
Date:   Sun May 3 21:12:25 2009 +0200

    debian/postinst: Remove also /etc/kernel/header_postinst.d/dkms and do an 
init script remove to un-do the "bad" links created by previous version

diff --git a/debian/postinst b/debian/postinst
index b595b89..840bf82 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -2,21 +2,32 @@
 
 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
-                       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 dpkg --compare-versions "$2" lt-nl "2.0.21.1-1~" ; then
+       if [ -e "/etc/modprobe.d/dkms" ]; then
+               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
+       fi
+
+       if [ -e "/etc/kernel/header_postinst.d/dkms" ]; then
+               md5sum=$(md5sum /etc/kernel/header_postinst.d/dkms | sed -e 's/ 
.*//')
+               old_md5sum=$(dpkg-query -W -f='${Conffiles}' dkms | \
+                       sed -n -e "\' /etc/kernel/header_postinst.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
+                               echo "Removing obsolete conffile 
/etc/kernel/header_postinst.d/dkms ..."
+                               rm -f /etc/kernel/header_postinst.d/dkms
+                               rmdir --ignore-fail-on-non-empty 
/etc/kernel/header_postinst.d/
                        fi
-               fi
        fi
+       # must do a remove first to un-do the "bad" links created by previous 
version
+       update-rc.d -f dkms_autoinstaller remove >/dev/null 2>&1
 fi
 
 #DEBHELPER#

-- 
Maintainance of the dkms package

_______________________________________________
Pkg-dkms-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-dkms-commits

Reply via email to