diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-15 18:33:05 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 10:43:42 +0100 |
commit | 60fd9974e5c9a0576059ebded6de7b599f9574e5 (patch) | |
tree | 1097b7301cd7784abe2401f5c6f3f0dd13f1e7ae | |
parent | 60884b6bee6be7250caca2f229eda174bcefd959 (diff) | |
download | openembedded-core-60fd9974e5c9a0576059ebded6de7b599f9574e5.tar.gz openembedded-core-60fd9974e5c9a0576059ebded6de7b599f9574e5.tar.bz2 openembedded-core-60fd9974e5c9a0576059ebded6de7b599f9574e5.zip |
sysvinit: use new update-alternatives
Also remove postinst and prerm which were not being used.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/postinst | 17 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/prerm | 9 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 65 |
3 files changed, 17 insertions, 74 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/postinst b/meta/recipes-core/sysvinit/sysvinit/postinst deleted file mode 100644 index b6fe547fa4..0000000000 --- a/meta/recipes-core/sysvinit/sysvinit/postinst +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/busybox ash - -action="$1" -oldversion="$2" - -umask 022 - -if [ "$action" != configure ] -then - exit 0 -fi - -update-alternatives --install /sbin/init init /sbin/sysvinit 25 -update-alternatives --install /sbin/need need /sbin/need.sysvinit 25 -update-alternatives --install /sbin/provide provide /sbin/provide.sysvinit 25 - -exit 0 diff --git a/meta/recipes-core/sysvinit/sysvinit/prerm b/meta/recipes-core/sysvinit/sysvinit/prerm deleted file mode 100644 index 704a29ffd5..0000000000 --- a/meta/recipes-core/sysvinit/sysvinit/prerm +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if [ "$1" != "upgrade" ]; then - update-alternatives --remove need /sbin/need.sysvinit - update-alternatives --remove provide /sbin/provide.sysvinit - update-alternatives --remove init /sbin/sysvinit -fi - -exit 0 diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index d3e430c76a..63333b06f4 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb @@ -5,7 +5,7 @@ SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" -PR = "r6" +PR = "r7" RDEPENDS_${PN} = "${PN}-inittab" @@ -27,10 +27,22 @@ B = "${S}/src" inherit update-alternatives -ALTERNATIVE_NAME = "init" -ALTERNATIVE_LINK = "${base_sbindir}/init" -ALTERNATIVE_PATH = "${base_sbindir}/init.sysvinit" -ALTERNATIVE_PRIORITY = "50" +ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg wall" + +ALTERNATIVE_PRIORITY = "200" + +ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" +ALTERNATIVE_PRIORITY[init] = "50" + +ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" +ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" +ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" +ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" +ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" +ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" + +ALTERNATIVE_${PN}-pidof = "pidof" +ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" @@ -65,47 +77,4 @@ do_install () { install -d ${D}${sysconfdir}/rc$level.d ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd done - mv ${D}${base_sbindir}/init ${D}${base_sbindir}/init.${BPN} - mv ${D}${base_bindir}/mountpoint ${D}${base_bindir}/mountpoint.${BPN} - mv ${D}${base_bindir}/pidof ${D}${base_bindir}/pidof.${BPN} - mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${BPN} - mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${BPN} - mv ${D}${base_sbindir}/runlevel ${D}${base_sbindir}/runlevel.${BPN} - mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${BPN} - mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${BPN} - mv ${D}${bindir}/last ${D}${bindir}/last.${BPN} - mv ${D}${bindir}/mesg ${D}${bindir}/mesg.${BPN} - mv ${D}${bindir}/wall ${D}${bindir}/wall.${BPN} -} - -pkg_postinst_${PN} () { - update-alternatives --install ${base_bindir}/mountpoint mountpoint mountpoint.${BPN} 200 - update-alternatives --install ${base_sbindir}/halt halt halt.${BPN} 200 - update-alternatives --install ${base_sbindir}/reboot reboot reboot.${BPN} 200 - update-alternatives --install ${base_sbindir}/runlevel runlevel runlevel.${BPN} 200 - update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${BPN} 200 - update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${BPN} 200 - update-alternatives --install ${bindir}/last last last.${BPN} 200 - update-alternatives --install ${bindir}/mesg mesg mesg.${BPN} 200 - update-alternatives --install ${bindir}/wall wall wall.${BPN} 200 -} - -pkg_prerm_${PN} () { - update-alternatives --remove mountpoint mountpoint.${BPN} - update-alternatives --remove halt halt.${BPN} - update-alternatives --remove reboot reboot.${BPN} - update-alternatives --remove runlevel runlevel.${BPN} - update-alternatives --remove shutdown shutdown.${BPN} - update-alternatives --remove poweroff poweroff.${BPN} - update-alternatives --remove last last.${BPN} - update-alternatives --remove mesg mesg.${BPN} - update-alternatives --remove wall wall.${BPN} -} - -pkg_postinst_sysvinit-pidof () { - update-alternatives --install ${base_bindir}/pidof pidof pidof.${BPN} 200 -} - -pkg_prerm_sysvinit-pidof () { - update-alternatives --remove pidof pidof.${BPN} } |