From 6d96b8d6c634928a8d528d450095dde33b4e1af9 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 15 Apr 2004 21:27:54 +0000 Subject: Merge openembedded@openembedded.bkbits.net:packages into linux.local:/home/kergoth/code/packages 2004/04/15 17:27:50-04:00 local!kergoth Add initial pass at modutils postinst/prerm BKrev: 407efe5aJVaY1gmG3rC-azaYVHHbXA --- modutils/modutils_2.4.25.oe | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'modutils/modutils_2.4.25.oe') 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 +} + -- cgit v1.2.3