From 3ccdc50eabcdcea497fec06c481bce39f8fa32b4 Mon Sep 17 00:00:00 2001 From: joeyh Date: Fri, 9 Jun 2006 21:20:31 +0000 Subject: 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- 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. --- autoscripts/postinst-modules | 4 +++- autoscripts/postrm-modules | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'autoscripts') diff --git a/autoscripts/postinst-modules b/autoscripts/postinst-modules index 11c206bc..0460eaaf 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 bcacb9f5..d710791d 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 -- cgit v1.2.3