diff options
-rw-r--r-- | modutils/modutils_2.4.25.oe | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modutils/modutils_2.4.25.oe b/modutils/modutils_2.4.25.oe index 0526339c96..bc429d30d0 100644 --- a/modutils/modutils_2.4.25.oe +++ b/modutils/modutils_2.4.25.oe @@ -21,3 +21,24 @@ do_install () { oe_machinstall -m 0644 ${FILESDIR}/modules ${D}/${sysconfdir}/modules oe_machinstall -m 0644 ${FILESDIR}/modules.conf ${D}/${sysconfdir}/modules.conf } + +pkg_postinst () { + if test -n "${D}"; then + D="-r ${D}" + if test -n "`which ${TARGET_PREFIX}depmod`"; then + for kerneldir in `ls -p ${IMAGE_ROOTFS}/lib/modules|grep /`; do + kernelver=`basename $kerneldir` + ${TARGET_PREFIX}depmod -a -b ${IMAGE_ROOTFS} -C ${IMAGE_ROOTFS}/${sysconfdir}/modules.conf -r $kernelver + done + fi + fi + update-rc.d $D modutils start 20 S . +} + +pkg_prerm () { + if test -n "${D}"; then + D="-r ${D}" + fi + update-rc.d $D modutils remove +} + |