diff options
-rw-r--r-- | meta/recipes-kernel/kmod/kmod_git.bb | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb index fd38d87978..c379a8d142 100644 --- a/meta/recipes-kernel/kmod/kmod_git.bb +++ b/meta/recipes-kernel/kmod/kmod_git.bb | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | require kmod.inc | 4 | require kmod.inc |
5 | 5 | ||
6 | PR = "${INC_PR}.2" | 6 | PR = "${INC_PR}.3" |
7 | 7 | ||
8 | PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | 8 | PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" |
9 | RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" | 9 | RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" |
@@ -22,9 +22,9 @@ do_install_append () { | |||
22 | install -dm755 ${D}${base_bindir} | 22 | install -dm755 ${D}${base_bindir} |
23 | install -dm755 ${D}${base_sbindir} | 23 | install -dm755 ${D}${base_sbindir} |
24 | # add symlinks to kmod | 24 | # add symlinks to kmod |
25 | ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod.kmod | 25 | ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod |
26 | for tool in {ins,rm,dep}mod mod{info,probe}; do | 26 | for tool in {ins,rm,dep}mod mod{info,probe}; do |
27 | ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool}.kmod | 27 | ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool} |
28 | done | 28 | done |
29 | # configuration directories | 29 | # configuration directories |
30 | install -dm755 ${D}${base_libdir}/depmod.d | 30 | install -dm755 ${D}${base_libdir}/depmod.d |
@@ -36,25 +36,22 @@ do_install_append () { | |||
36 | install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" | 36 | install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" |
37 | } | 37 | } |
38 | 38 | ||
39 | pkg_postinst_kmod() { | 39 | inherit update-alternatives |
40 | for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do | ||
41 | bn=`basename $f` | ||
42 | update-alternatives --install /$f $bn /$f.kmod 60 | ||
43 | done | ||
44 | update-alternatives --install /bin/lsmod bin-lsmod /bin/lsmod.kmod 60 | ||
45 | update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.kmod 60 | ||
46 | update-alternatives --install /sbin/depmod depmod /sbin/depmod.kmod 60 | ||
47 | } | ||
48 | 40 | ||
49 | pkg_prerm_kmod() { | 41 | ALTERNATIVE_PRIORITY = "60" |
50 | for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do | 42 | |
51 | bn=`basename $f` | 43 | ALTERNATIVE_kmod = "insmod modprobe rmmod modinfo bin-lsmod lsmod depmod" |
52 | update-alternatives --remove $bn /$f.kmod | 44 | |
53 | done | 45 | ALTERNATIVE_LINK_NAME[insmod] = "${base_sbindir}/insmod" |
54 | update-alternatives --remove bin-lsmod /bin/lsmod.kmod | 46 | ALTERNATIVE_LINK_NAME[modprobe] = "${base_sbindir}/modprobe" |
55 | update-alternatives --remove lsmod /bin/lsmod.kmod | 47 | ALTERNATIVE_LINK_NAME[rmmod] = "${base_sbindir}/rmmod" |
56 | update-alternatives --remove depmod /sbin/depmod.kmod | 48 | ALTERNATIVE_LINK_NAME[modinfo] = "${base_sbindir}/modinfo" |
57 | } | 49 | ALTERNATIVE_LINK_NAME[bin-lsmod] = "${base_bindir}/lsmod" |
50 | |||
51 | ALTERNATIVE_LINK_NAME[lsmod] = "${base_sbindir}/lsmod" | ||
52 | ALTERNATIVE_TARGET[lsmod] = "${base_bindir}/lsmod.${BPN}" | ||
53 | |||
54 | ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod" | ||
58 | 55 | ||
59 | PACKAGES =+ "libkmod" | 56 | PACKAGES =+ "libkmod" |
60 | 57 | ||