diff options
author | Kevin Tian <kevin.tian@intel.com> | 2010-09-27 12:42:55 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-29 16:42:43 +0100 |
commit | e88a8951bee39954a42cacea0f5662c2ba9070b9 (patch) | |
tree | ec6156824e097059dbfd94fd75c28d4f1cdab42d /meta/recipes-extended | |
parent | b797a842babd3d4ebad7d383346127a49269fd8b (diff) | |
download | openembedded-core-e88a8951bee39954a42cacea0f5662c2ba9070b9.tar.gz openembedded-core-e88a8951bee39954a42cacea0f5662c2ba9070b9.tar.bz2 openembedded-core-e88a8951bee39954a42cacea0f5662c2ba9070b9.zip |
procps: use new batch update-alternatives feature
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/procps/procps_3.2.7.bb | 36 |
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 @@ require procps.inc -PR = "r8" +PR = "r9" -inherit update-rc.d +inherit update-rc.d update-alternatives INITSCRIPT_NAME = "procps.sh" INITSCRIPT_PARAMS = "start 30 S ." +ALTERNATIVE_LINKS = "${bindir}/top ${bindir}/uptime ${bindir}/free ${bindir}/pkill \ + ${base_bindir}/kill ${base_sbindir}/sysctl ${base_bindir}/ps" +ALTERNATIVE_PRIORITY = "90" + SRC_URI += "file://procmodule.patch;patch=1 \ file://psmodule.patch;patch=1 \ file://linux-limits.patch;patch=1 \ @@ -33,32 +37,4 @@ do_install_append () { install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/procps.init ${D}${sysconfdir}/init.d/procps.sh - - mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN} - mv ${D}${bindir}/top ${D}${bindir}/top.${PN} - mv ${D}${base_bindir}/kill ${D}${base_bindir}/kill.${PN} - mv ${D}${base_bindir}/ps ${D}${base_bindir}/ps.${PN} - mv ${D}${bindir}/free ${D}${bindir}/free.${PN} - mv ${D}${base_sbindir}/sysctl ${D}${base_sbindir}/sysctl.${PN} - mv ${D}${bindir}/pkill ${D}${bindir}/pkill.${PN} -} - -pkg_postinst() { - update-alternatives --install ${bindir}/top top top.${PN} 90 - update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 90 - update-alternatives --install ${base_bindir}/ps ps ps.${PN} 90 - update-alternatives --install ${base_bindir}/kill kill kill.${PN} 90 - update-alternatives --install ${bindir}/free free free.${PN} 90 - update-alternatives --install ${base_sbindir}/sysctl sysctl sysctl.${PN} 90 - update-alternatives --install ${bindir}/pkill pkill pkill.${PN} 90 -} - -pkg_postrm() { - update-alternatives --remove top top.${PN} - update-alternatives --remove ps ps.${PN} - update-alternatives --remove uptime uptime.${PN} - update-alternatives --remove kill kill.${PN} - update-alternatives --remove free free.${PN} - update-alternatives --remove sysctl sysctl.${PN} - update-alternatives --remove pkill pkill.${PN} } |