summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
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 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