diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-21 16:18:08 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 12:04:44 +0100 |
commit | ddcf94ecd9a64f889c8463a41c7f65598a133b7c (patch) | |
tree | 5b7d6a824e756a744d48c38faa1d9a94cff7149f /meta/recipes-extended/iputils | |
parent | 0b5c42347577425757afaf062f4d6aae4d27c7f7 (diff) | |
download | poky-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.bb | 34 |
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 | ||
14 | DEPENDS = "sysfsutils openssl docbook-utils-native sgmlspl-native" | 14 | DEPENDS = "sysfsutils openssl docbook-utils-native sgmlspl-native" |
15 | 15 | ||
16 | PR = "r3" | 16 | PR = "r4" |
17 | 17 | ||
18 | SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \ | 18 | SRC_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 () { | |||
34 | do_install () { | 34 | do_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 | 50 | inherit update-alternatives |
51 | # Also fixup SUID bit for applications that need it | 51 | |
52 | ALTERNATIVE_PRIORITY = "100" | ||
53 | |||
54 | ALTERNATIVE_${PN}-ping = "ping" | ||
55 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | ||
56 | |||
57 | ALTERNATIVE_${PN}-ping6 = "ping6" | ||
58 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" | ||
59 | |||
52 | pkg_postinst_${PN}-ping () { | 60 | pkg_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 | } | ||
56 | pkg_prerm_${PN}-ping () { | ||
57 | update-alternatives --remove ping ping.${PN} | ||
58 | } | 62 | } |
59 | 63 | ||
60 | pkg_postinst_${PN}-ping6 () { | 64 | pkg_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 | } | ||
64 | pkg_prerm_${PN}-ping6 () { | ||
65 | update-alternatives --remove ping6 ping6.${PN} | ||
66 | } | 66 | } |
67 | 67 | ||
68 | pkg_postinst_${PN}-traceroute6 () { | 68 | pkg_postinst_${PN}-traceroute6 () { |
@@ -75,8 +75,8 @@ ALLOW_EMPTY_${PN} = "1" | |||
75 | RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" | 75 | RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6" |
76 | 76 | ||
77 | FILES_${PN} = "" | 77 | FILES_${PN} = "" |
78 | FILES_${PN}-ping = "${base_bindir}/ping.${PN}" | 78 | FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" |
79 | FILES_${PN}-ping6 = "${base_bindir}/ping6.${PN}" | 79 | FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" |
80 | FILES_${PN}-arping = "${base_bindir}/arping" | 80 | FILES_${PN}-arping = "${base_bindir}/arping" |
81 | FILES_${PN}-tracepath = "${base_bindir}/tracepath" | 81 | FILES_${PN}-tracepath = "${base_bindir}/tracepath" |
82 | FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" | 82 | FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6" |