aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2004-12-05 18:56:12 +0000
committerPhil Blundell <philb@gnu.org>2004-12-05 18:56:12 +0000
commit8b03c6fc9c59d810aeac04ee877ed59ce5575ab9 (patch)
treeff5c17e23640267be926c98b3e093d947fbdd31f
parent250e5fb93ffff6211cf673abcae688a0619a93e4 (diff)
downloadopenembedded-8b03c6fc9c59d810aeac04ee877ed59ce5575ab9.tar.gz
add alternatives stuff for modutils, same as module-init-tools
BKrev: 41b359ccoK2YRGKoMHSApwk39wN6iw
-rw-r--r--modutils/modutils_2.4.27.oe67
1 files changed, 51 insertions, 16 deletions
diff --git a/modutils/modutils_2.4.27.oe b/modutils/modutils_2.4.27.oe
index 2b950f6111..e1cafca976 100644
--- a/modutils/modutils_2.4.27.oe
+++ b/modutils/modutils_2.4.27.oe
@@ -3,7 +3,7 @@ DESCRIPTION = "These utilities are intended to make a Linux modular kernel \
manageable for all users, administrators and distribution maintainers."
LICENSE = "GPLv2"
FILESDIR = "${@os.path.dirname(oe.data.getVar('FILE',d,1))}/files"
-PR = "r4"
+PR = "r5"
SRC_URI = "ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/modutils-${PV}.tar.bz2 \
file://lex.l.diff;patch=1 \
@@ -23,30 +23,65 @@ export BUILDCFLAGS = "${BUILD_CFLAGS}"
do_install () {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}/${sysconfdir}
+ rm ${D}/sbin/lsmod
+ install -d ${D}/bin/
+ ln -s ../sbin/insmod ${D}/bin/lsmod
+ for f in bin/lsmod sbin/insmod sbin/rmmod sbin/modprobe sbin/modinfo; do mv ${D}/$f ${D}/$f.24
+ done
}
pkg_postinst_modutils () {
- 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
+#!/bin/sh
+for f in sbin/insmod sbin/modprobe sbin/rmmod bin/lsmod; do
+ bn=`basename $f`
+ update-alternatives --install /$f $bn /$f.24 10
+done
+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
- update-rc.d $D modutils.sh start 20 S .
+fi
+update-rc.d $D modutils.sh start 20 S .
}
pkg_prerm_modutils () {
- if test -n "$D"; then
- D="-r $D"
- fi
- update-rc.d $D modutils.sh remove
+#!/bin/sh
+for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/depmod sbin/modinfo bin/lsmod; do
+bn=`basename $f`
+ update-alternatives --remove $bn /$f.24
+done
+if test -n "$D"; then
+ D="-r $D"
+fi
+update-rc.d $D modutils.sh remove
+}
+
+pkg_postinst_modutils-depmod() {
+#!/bin/sh
+update-alternatives --install /sbin/depmod depmod /sbin/depmod.24 10
+}
+
+pkg_postinst_modutils-modinfo() {
+#!/bin/sh
+update-alternatives --install /sbin/modinfo modinfo /sbin/modinfo.24 10
+}
+
+pkg_prerm_modutils-depmod() {
+#!/bin/sh
+update-alternatives --remove depmod /sbin/depmod.24
+}
+
+pkg_prerm_modutils-modinfo() {
+#!/bin/sh
+update-alternatives --remove modinfo /sbin/modinfo.24
}
PACKAGES = "modutils-depmod modutils-modinfo modutils-doc modutils"
-FILES_modutils-depmod = "sbin/depmod"
-FILES_modutils-modinfo = "sbin/modinfo"
+FILES_modutils-depmod = "sbin/depmod.24"
+FILES_modutils-modinfo = "sbin/modinfo.24"
RDEPENDS_modutils = "modutils-depmod"