summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/iputils
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-21 16:18:08 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:04:44 +0100
commitddcf94ecd9a64f889c8463a41c7f65598a133b7c (patch)
tree5b7d6a824e756a744d48c38faa1d9a94cff7149f /meta/recipes-extended/iputils
parent0b5c42347577425757afaf062f4d6aae4d27c7f7 (diff)
downloadpoky-ddcf94ecd9a64f889c8463a41c7f65598a133b7c.tar.gz
iputils: use new update-alternatives
(From OE-Core rev: dbd81c151305faf20f8e9e6f1a588d6ce4cfd49b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/iputils')
-rw-r--r--meta/recipes-extended/iputils/iputils_s20101006.bb34
1 files changed, 17 insertions, 17 deletions
diff --git a/meta/recipes-extended/iputils/iputils_s20101006.bb b/meta/recipes-extended/iputils/iputils_s20101006.bb
index a0921924e5..394ab5803c 100644
--- a/meta/recipes-extended/iputils/iputils_s20101006.bb
+++ b/meta/recipes-extended/iputils/iputils_s20101006.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f
13 13
14DEPENDS = "sysfsutils openssl docbook-utils-native sgmlspl-native" 14DEPENDS = "sysfsutils openssl docbook-utils-native sgmlspl-native"
15 15
16PR = "r3" 16PR = "r4"
17 17
18SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ 18SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
19 file://debian/fix-dead-host-ping-stats.diff \ 19 file://debian/fix-dead-host-ping-stats.diff \
@@ -34,8 +34,8 @@ do_compile () {
34do_install () { 34do_install () {
35 install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8 35 install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
36 # SUID root programs 36 # SUID root programs
37 install -m 4555 ping ${D}${base_bindir}/ping.${PN} 37 install -m 4555 ping ${D}${base_bindir}/ping
38 install -m 4555 ping6 ${D}${base_bindir}/ping6.${PN} 38 install -m 4555 ping6 ${D}${base_bindir}/ping6
39 install -m 4555 traceroute6 ${D}${base_bindir}/ 39 install -m 4555 traceroute6 ${D}${base_bindir}/
40 # Other programgs 40 # Other programgs
41 for i in arping tracepath tracepath6; do 41 for i in arping tracepath tracepath6; do
@@ -47,22 +47,22 @@ do_install () {
47 done 47 done
48} 48}
49 49
50# Busybox also provides ping and ping6, so use update-alternatives 50inherit update-alternatives
51# Also fixup SUID bit for applications that need it 51
52ALTERNATIVE_PRIORITY = "100"
53
54ALTERNATIVE_${PN}-ping = "ping"
55ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
56
57ALTERNATIVE_${PN}-ping6 = "ping6"
58ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
59
52pkg_postinst_${PN}-ping () { 60pkg_postinst_${PN}-ping () {
53 chmod 4555 ${base_bindir}/ping.${PN} 61 chmod 4555 ${base_bindir}/ping
54 update-alternatives --install ${base_bindir}/ping ping ping.${PN} 100
55}
56pkg_prerm_${PN}-ping () {
57 update-alternatives --remove ping ping.${PN}
58} 62}
59 63
60pkg_postinst_${PN}-ping6 () { 64pkg_postinst_${PN}-ping6 () {
61 chmod 4555 ${base_bindir}/ping6.${PN} 65 chmod 4555 ${base_bindir}/ping6
62 update-alternatives --install ${base_bindir}/ping6 ping6 ping6.${PN} 100
63}
64pkg_prerm_${PN}-ping6 () {
65 update-alternatives --remove ping6 ping6.${PN}
66} 66}
67 67
68pkg_postinst_${PN}-traceroute6 () { 68pkg_postinst_${PN}-traceroute6 () {
@@ -75,8 +75,8 @@ ALLOW_EMPTY_${PN} = "1"
75RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" 75RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
76 76
77FILES_${PN} = "" 77FILES_${PN} = ""
78FILES_${PN}-ping = "${base_bindir}/ping.${PN}" 78FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
79FILES_${PN}-ping6 = "${base_bindir}/ping6.${PN}" 79FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
80FILES_${PN}-arping = "${base_bindir}/arping" 80FILES_${PN}-arping = "${base_bindir}/arping"
81FILES_${PN}-tracepath = "${base_bindir}/tracepath" 81FILES_${PN}-tracepath = "${base_bindir}/tracepath"
82FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" 82FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"