summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2018-04-06 09:22:10 -0500
committerJohn Klug <john.klug@multitech.com>2018-04-06 09:22:10 -0500
commit3ba4e967bfd4ee137e19cde89d71349834a535d4 (patch)
tree03b6e439e782fdb1952771c400318094d79da443
parente3fe22e86dd47ba32fc1b32cc4da747aa2584d57 (diff)
downloadmeta-multitech-3ba4e967bfd4ee137e19cde89d71349834a535d4.tar.gz
meta-multitech-3ba4e967bfd4ee137e19cde89d71349834a535d4.tar.bz2
meta-multitech-3ba4e967bfd4ee137e19cde89d71349834a535d4.zip
Put default module post-remove/post-install scripts into mts-io and vizzini IPK install/remove
-rw-r--r--recipes-bsp/multitech/mts-io.inc21
-rw-r--r--recipes-kernel/vizzini/vizzini.inc5
2 files changed, 19 insertions, 7 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
}
diff --git a/recipes-kernel/vizzini/vizzini.inc b/recipes-kernel/vizzini/vizzini.inc
index eb9bc54..def3f1b 100644
--- a/recipes-kernel/vizzini/vizzini.inc
+++ b/recipes-kernel/vizzini/vizzini.inc
@@ -46,8 +46,3 @@ do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/vizzini.init ${D}${sysconfdir}/init.d/vizzini
}
-
-pkg_postinst_${PN} () {
- /sbin/depmod -a
-}
-