summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-02-11 14:18:16 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-12 00:30:29 +0000
commit9849e700adbd1391e71e1e88799772524fad9a5a (patch)
tree4784dc2252203209a723a0fe63a4267c3f94e93e /meta/recipes-core
parent3faa635fd408695dd5b754fda3f6060dd670b81d (diff)
downloadpoky-9849e700adbd1391e71e1e88799772524fad9a5a.tar.gz
busybox: Rework busybox to fix limitations in initscripts
A recent busybox change added a "second" initscript to the main busybox package. This however is not supported by the update-rc.d.bbclass. Instead we split the package so that each initscript gets it's own split. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox.inc21
1 files changed, 14 insertions, 7 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 55f056c4c0..9f2d64c093 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -12,22 +12,25 @@ SECTION = "base"
12PRIORITY = "required" 12PRIORITY = "required"
13 13
14export EXTRA_CFLAGS = "${CFLAGS}" 14export EXTRA_CFLAGS = "${CFLAGS}"
15PACKAGES =+ "${PN}-httpd ${PN}-udhcpd" 15PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog"
16 16
17FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" 17FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
18FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog.conf*"
18FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" 19FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
20FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc"
19 21
20FILES_${PN} += "${datadir}/udhcpc" 22INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-udhcpc"
21FILES_${PN} += "${sysconfdir}/init.d/busybox-udhcpc"
22 23
23INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
24INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" 24INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
25INITSCRIPT_NAME_${PN}-syslog = "syslog"
25INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 26INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
26INITSCRIPT_NAME_${PN} = "syslog busybox-udhcpc" 27INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc"
27CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}" 28CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf.${PN}"
29
30RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
28 31
29# This disables the syslog startup links in slugos (see slugos-init) 32# This disables the syslog startup links in slugos (see slugos-init)
30INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ." 33INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ."
31 34
32inherit cml1 update-rc.d 35inherit cml1 update-rc.d
33 36
@@ -116,7 +119,9 @@ pkg_postinst_${PN} () {
116 119
117 # This adds the links, remember that this has to work when building an image too, hence the $D 120 # This adds the links, remember that this has to work when building an image too, hence the $D
118 while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links 121 while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; update-alternatives --install $link $bn $to 50; done <$D/etc/busybox.links
122}
119 123
124pkg_postinst_${PN}-syslog () {
120 update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50 125 update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
121 update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 50 126 update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${PN} 50
122} 127}
@@ -150,7 +155,9 @@ pkg_prerm_${PN} () {
150 bn=`basename $link` 155 bn=`basename $link`
151 sh /usr/bin/update-alternatives --remove $bn $to 156 sh /usr/bin/update-alternatives --remove $bn $to
152 done </etc/busybox.links 157 done </etc/busybox.links
158}
153 159
160pkg_prerm_${PN}-syslog () {
154 # remove syslog 161 # remove syslog
155 if test "x$D" = "x"; then 162 if test "x$D" = "x"; then
156 if test "$1" = "upgrade" -o "$1" = "remove"; then 163 if test "$1" = "upgrade" -o "$1" = "remove"; then