summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
authorjoeyh <joeyh>2006-06-09 21:20:31 +0000
committerjoeyh <joeyh>2006-06-09 21:20:31 +0000
commit3ccdc50eabcdcea497fec06c481bce39f8fa32b4 (patch)
tree501c209bf6584dff95e1cbe14b5e223deb272000 /autoscripts
parentb3f5766834900b632d9cf180df212124f1a8351f (diff)
r1929: * dh_installmodules: depmod -a is no longer run during boot, so if a module
package is installed for a kernel other than the running kernel, just running depmod -a in the postinst is no longer sufficient. Instead, run depmod -a -F /boot/System.map-<kvers> <kvers> The kernel version is guessed at based on the path to the modules in the package. Closes: #301424 * Note: behavior change due to the above: The mere existence of a debian/package.modules file will no longer make dh_installmodules add code to maintainer scripts. * Untested.
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-modules4
-rw-r--r--autoscripts/postrm-modules4
2 files changed, 6 insertions, 2 deletions
diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules
index 11c206b..0460eaa 100644
--- a/autoscripts/postinst-modules
+++ b/autoscripts/postinst-modules
@@ -2,5 +2,7 @@ if [ "$1" = "configure" ]; then
if [ -x "`which update-modules 2>/dev/null`" ]; then
update-modules >/dev/null || [ "$?" = 3 ]
fi
- depmod -a || true
+ if [ -e /boot/System.map-#KVERS# ]; then
+ depmod -a -F /boot/System.map-#KVERS# #KVERS# || true
+ fi
fi
diff --git a/autoscripts/postrm-modules b/autoscripts/postrm-modules
index bcacb9f..d710791 100644
--- a/autoscripts/postrm-modules
+++ b/autoscripts/postrm-modules
@@ -1,4 +1,6 @@
if [ -x "`which update-modules 2>/dev/null`" ]; then
update-modules >/dev/null || [ "$?" = 3 ]
fi
-depmod -a || true
+if [ -e /boot/System.map-#KVERS# ]; then
+ depmod -a -F /boot/System.map-#KVERS# #KVERS# || true
+fi