summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/procps
diff options
context:
space:
mode:
authorKevin Tian <kevin.tian@intel.com>2010-09-27 12:42:55 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-29 16:42:43 +0100
commite88a8951bee39954a42cacea0f5662c2ba9070b9 (patch)
treeec6156824e097059dbfd94fd75c28d4f1cdab42d /meta/recipes-extended/procps
parentb797a842babd3d4ebad7d383346127a49269fd8b (diff)
downloadpoky-e88a8951bee39954a42cacea0f5662c2ba9070b9.tar.gz
procps: use new batch update-alternatives feature
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'meta/recipes-extended/procps')
-rw-r--r--meta/recipes-extended/procps/procps_3.2.7.bb36
1 files changed, 6 insertions, 30 deletions
diff --git a/meta/recipes-extended/procps/procps_3.2.7.bb b/meta/recipes-extended/procps/procps_3.2.7.bb
index 6da975adc7..b795c2b36a 100644
--- a/meta/recipes-extended/procps/procps_3.2.7.bb
+++ b/meta/recipes-extended/procps/procps_3.2.7.bb
@@ -1,12 +1,16 @@
1require procps.inc 1require procps.inc
2 2
3PR = "r8" 3PR = "r9"
4 4
5inherit update-rc.d 5inherit update-rc.d update-alternatives
6 6
7INITSCRIPT_NAME = "procps.sh" 7INITSCRIPT_NAME = "procps.sh"
8INITSCRIPT_PARAMS = "start 30 S ." 8INITSCRIPT_PARAMS = "start 30 S ."
9 9
10ALTERNATIVE_LINKS = "${bindir}/top ${bindir}/uptime ${bindir}/free ${bindir}/pkill \
11 ${base_bindir}/kill ${base_sbindir}/sysctl ${base_bindir}/ps"
12ALTERNATIVE_PRIORITY = "90"
13
10SRC_URI += "file://procmodule.patch;patch=1 \ 14SRC_URI += "file://procmodule.patch;patch=1 \
11 file://psmodule.patch;patch=1 \ 15 file://psmodule.patch;patch=1 \
12 file://linux-limits.patch;patch=1 \ 16 file://linux-limits.patch;patch=1 \
@@ -33,32 +37,4 @@ do_install_append () {
33 install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf 37 install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
34 install -d ${D}${sysconfdir}/init.d 38 install -d ${D}${sysconfdir}/init.d
35 install -m 0755 ${WORKDIR}/procps.init ${D}${sysconfdir}/init.d/procps.sh 39 install -m 0755 ${WORKDIR}/procps.init ${D}${sysconfdir}/init.d/procps.sh
36
37 mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN}
38 mv ${D}${bindir}/top ${D}${bindir}/top.${PN}
39 mv ${D}${base_bindir}/kill ${D}${base_bindir}/kill.${PN}
40 mv ${D}${base_bindir}/ps ${D}${base_bindir}/ps.${PN}
41 mv ${D}${bindir}/free ${D}${bindir}/free.${PN}
42 mv ${D}${base_sbindir}/sysctl ${D}${base_sbindir}/sysctl.${PN}
43 mv ${D}${bindir}/pkill ${D}${bindir}/pkill.${PN}
44}
45
46pkg_postinst() {
47 update-alternatives --install ${bindir}/top top top.${PN} 90
48 update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 90
49 update-alternatives --install ${base_bindir}/ps ps ps.${PN} 90
50 update-alternatives --install ${base_bindir}/kill kill kill.${PN} 90
51 update-alternatives --install ${bindir}/free free free.${PN} 90
52 update-alternatives --install ${base_sbindir}/sysctl sysctl sysctl.${PN} 90
53 update-alternatives --install ${bindir}/pkill pkill pkill.${PN} 90
54}
55
56pkg_postrm() {
57 update-alternatives --remove top top.${PN}
58 update-alternatives --remove ps ps.${PN}
59 update-alternatives --remove uptime uptime.${PN}
60 update-alternatives --remove kill kill.${PN}
61 update-alternatives --remove free free.${PN}
62 update-alternatives --remove sysctl sysctl.${PN}
63 update-alternatives --remove pkill pkill.${PN}
64} 40}