Merge openembedded@openembedded.bkbits.net:packages
authorChris Larson <clarson@kergoth.com>
Thu, 15 Apr 2004 21:27:54 +0000 (21:27 +0000)
committerChris Larson <clarson@kergoth.com>
Thu, 15 Apr 2004 21:27:54 +0000 (21:27 +0000)
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

index 0526339..bc429d3 100644 (file)
@@ -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
+}
+