From 3ba4e967bfd4ee137e19cde89d71349834a535d4 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 6 Apr 2018 09:22:10 -0500 Subject: Put default module post-remove/post-install scripts into mts-io and vizzini IPK install/remove --- recipes-bsp/multitech/mts-io.inc | 21 +++++++++++++++++++-- recipes-kernel/vizzini/vizzini.inc | 5 ----- 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 -} - -- cgit v1.2.3