summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-04-15 21:27:54 +0000
committerChris Larson <clarson@kergoth.com>2004-04-15 21:27:54 +0000
commit6d96b8d6c634928a8d528d450095dde33b4e1af9 (patch)
treefebf671f263297d7c0b55015a1fc828ad212cecb /modutils
parent9a12976030092b0976076f8105ddb2b0eada6709 (diff)
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
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modutils_2.4.25.oe21
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
+}
+