summaryrefslogtreecommitdiff
path: root/recipes-bsp/multitech/mts-io.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-bsp/multitech/mts-io.inc')
-rw-r--r--recipes-bsp/multitech/mts-io.inc21
1 files changed, 19 insertions, 2 deletions
diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc
index 42edc5e..fa54024 100644
--- a/recipes-bsp/multitech/mts-io.inc
+++ b/recipes-bsp/multitech/mts-io.inc
@@ -99,6 +99,23 @@ fakeroot do_install_append_mtcap() {
sed -i 's/ENABLED="yes"/ENABLED="no"/g' ${D}${sysconfdir}/default/radio-reset
}
-pkg_postins_${PN} () {
- /sbin/depmod -a
+# If we called our package kernel-module-mts-io, we would not need to do this.
+# but since kernel-module is not in the package name, the kernel module class
+# cannot find a package to place the post-install and post-remove script.
+pkg_postinst_${PN} () {
+ if [ -z "$D" ]; then
+ depmod -a ${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}
+ else
+ # image.bbclass will call depmodwrapper after everything is installed,
+ # no need to do it here as well
+ :
+ fi
+}
+
+pkg_postrm_${PN} () {
+ if [ -z "$D" ]; then
+ depmod -a ${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}
+ else
+ depmodwrapper -a -b $D ${MLINUX_KERNEL_VERSION}${MLINUX_KERNEL_EXTRA_VERSION}
+ fi
}