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

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


The following commit has been merged in the master branch:
commit 6cd45ece3425d40df7485fc0a778e69aa1cb97c1
Author: Giuseppe Iuculano <giuseppe at iuculano.it>
Date:   Fri Apr 24 17:13:49 2009 +0200

    debian/patches/15_modprobe.patch: Do not install /etc/modprobe.d/dkms, it only contains comments and is opened and parsed every time modprobe is run (and it is run very often at boot time). Use instead (and create if necessary) /etc/modprobe.d/package_name.conf. (Closes: #525379)

diff --git a/debian/patches/15_modprobe.patch b/debian/patches/15_modprobe.patch
new file mode 100644
index 0000000..f14c75b
--- /dev/null
+++ b/debian/patches/15_modprobe.patch
@@ -0,0 +1,38 @@
+do not install /etc/modprobe.d/dkms, it only contains comments and is opened and parsed every time modprobe is run (and it is run very often at boot time). Use instead (and create if necessary) /etc/modprobe.d/package_name.conf.
+--- a/dkms
++++ b/dkms
+@@ -739,6 +739,14 @@ function moduleconfig_add ()
+     [ -e /etc/modprobe.d/dkms ] && modconfig_files="/etc/modprobe.d/dkms"
+     [ -e /etc/modules.conf ] && modconfig_files="$modconfig_files /etc/modules.conf"
+     [ -e /etc/modprobe.conf ] && modconfig_files="$modconfig_files /etc/modprobe.conf"
++    [ -e /etc/modprobe.d/$package_name.conf ] && modconfig_files="/etc/modprobe.d/$package_name.conf"
++
++    if [ -z "$modconfig_files" ]; then
++	    touch /etc/modprobe.d/$package_name.conf
++	    echo $"created /etc/modprobe.d/$package_name.conf.">&2
++	    modconfig_files="/etc/modprobe.d/$package_name.conf"
++    fi
++
+ 
+     for moduleconfig in $modconfig_files; do
+ 	local index=0
+@@ -809,6 +817,7 @@ function moduleconfig_remove ()
+     [ -e /etc/modprobe.d/dkms ] && modconfig_files="/etc/modprobe.d/dkms"
+     [ -e /etc/modules.conf ] && modconfig_files="$modconfig_files /etc/modules.conf"
+     [ -e /etc/modprobe.conf ] && modconfig_files="$modconfig_files /etc/modprobe.conf"
++    [ -e /etc/modprobe.d/$package_name.conf ] && modconfig_files="/etc/modprobe.d/$package_name.conf"
+ 
+     for moduleconfig in $modconfig_files; do
+ 	index=0
+@@ -833,6 +842,11 @@ function moduleconfig_remove ()
+ 		    grep -v "alias ${modules_conf_alias_type[$index]}[0-9]* ${dest_module_name[$index]}" $moduleconfig > $temp_dir_name/moduleconfig.new
+ 		    mv -f $temp_dir_name/moduleconfig.new $moduleconfig
+ 		    echo $"$moduleconfig: removed alias for '${dest_module_name[$index]}'"
++		    if [ "$modconfig_files" == "/etc/modprobe.d/$package_name.conf" ]; then
++			    rm -f /etc/modprobe.d/$package_name.conf
++			    echo $"$moduleconfig: deleted /etc/modprobe.d/$package_name.conf file"
++		    fi
++
+ 		fi
+ 	    fi
+ 
diff --git a/debian/patches/series b/debian/patches/series
index d9762cd..44aebf6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
 12-use_invoke-rc.d.patch
 13-template.patch
 14_new_module-init-tools.patch
+15_modprobe.patch
diff --git a/debian/rules b/debian/rules
index e4c39a0..283604c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,7 +41,7 @@ binary-indep: build install
 	dh_installexamples
 	dh_installinit --name dkms_autoinstaller
 	dh_installman
-	dh_installmodules
+	#dh_installmodules
 	dh_link
 	dh_strip
 	dh_compress

-- 
Maintainance of the dkms package



More information about the Pkg-dkms-commits mailing list