summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2012-03-23 17:37:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-23 17:47:40 +0000
commitb2c6e1ead7152e55030d4dce3d6333326643871d (patch)
treeb423fd4ebf2c524b90fb5cb4f6e7b85c808010cc /meta/recipes-core/sysvinit
parent180d7d391dab2dd1666d4524e558cc45d2c647fc (diff)
downloadpoky-b2c6e1ead7152e55030d4dce3d6333326643871d.tar.gz
sysvinit: use update-alternatives for mountpoint and runlevel
* mountpoint and runlevel may be provided by busybox. * Use update-alternatives to avoid conflict. (From OE-Core rev: 3122da7cb2cbaf2f79c299acd5d2070caf07ec56) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/sysvinit')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 663e298e4a..d3e430c76a 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"
5LICENSE = "GPLv2+" 5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" 7 file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
8PR = "r5" 8PR = "r6"
9 9
10RDEPENDS_${PN} = "${PN}-inittab" 10RDEPENDS_${PN} = "${PN}-inittab"
11 11
@@ -66,9 +66,11 @@ do_install () {
66 ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd 66 ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd
67 done 67 done
68 mv ${D}${base_sbindir}/init ${D}${base_sbindir}/init.${BPN} 68 mv ${D}${base_sbindir}/init ${D}${base_sbindir}/init.${BPN}
69 mv ${D}${base_bindir}/mountpoint ${D}${base_bindir}/mountpoint.${BPN}
69 mv ${D}${base_bindir}/pidof ${D}${base_bindir}/pidof.${BPN} 70 mv ${D}${base_bindir}/pidof ${D}${base_bindir}/pidof.${BPN}
70 mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${BPN} 71 mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${BPN}
71 mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${BPN} 72 mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${BPN}
73 mv ${D}${base_sbindir}/runlevel ${D}${base_sbindir}/runlevel.${BPN}
72 mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${BPN} 74 mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${BPN}
73 mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${BPN} 75 mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${BPN}
74 mv ${D}${bindir}/last ${D}${bindir}/last.${BPN} 76 mv ${D}${bindir}/last ${D}${bindir}/last.${BPN}
@@ -77,8 +79,10 @@ do_install () {
77} 79}
78 80
79pkg_postinst_${PN} () { 81pkg_postinst_${PN} () {
82 update-alternatives --install ${base_bindir}/mountpoint mountpoint mountpoint.${BPN} 200
80 update-alternatives --install ${base_sbindir}/halt halt halt.${BPN} 200 83 update-alternatives --install ${base_sbindir}/halt halt halt.${BPN} 200
81 update-alternatives --install ${base_sbindir}/reboot reboot reboot.${BPN} 200 84 update-alternatives --install ${base_sbindir}/reboot reboot reboot.${BPN} 200
85 update-alternatives --install ${base_sbindir}/runlevel runlevel runlevel.${BPN} 200
82 update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${BPN} 200 86 update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${BPN} 200
83 update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${BPN} 200 87 update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${BPN} 200
84 update-alternatives --install ${bindir}/last last last.${BPN} 200 88 update-alternatives --install ${bindir}/last last last.${BPN} 200
@@ -87,8 +91,10 @@ pkg_postinst_${PN} () {
87} 91}
88 92
89pkg_prerm_${PN} () { 93pkg_prerm_${PN} () {
94 update-alternatives --remove mountpoint mountpoint.${BPN}
90 update-alternatives --remove halt halt.${BPN} 95 update-alternatives --remove halt halt.${BPN}
91 update-alternatives --remove reboot reboot.${BPN} 96 update-alternatives --remove reboot reboot.${BPN}
97 update-alternatives --remove runlevel runlevel.${BPN}
92 update-alternatives --remove shutdown shutdown.${BPN} 98 update-alternatives --remove shutdown shutdown.${BPN}
93 update-alternatives --remove poweroff poweroff.${BPN} 99 update-alternatives --remove poweroff poweroff.${BPN}
94 update-alternatives --remove last last.${BPN} 100 update-alternatives --remove last last.${BPN}