diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2011-02-11 14:18:16 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-12 00:30:29 +0000 |
commit | 9849e700adbd1391e71e1e88799772524fad9a5a (patch) | |
tree | 4784dc2252203209a723a0fe63a4267c3f94e93e /meta/recipes-core | |
parent | 3faa635fd408695dd5b754fda3f6060dd670b81d (diff) | |
download | poky-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.inc | 21 |
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" | |||
12 | PRIORITY = "required" | 12 | PRIORITY = "required" |
13 | 13 | ||
14 | export EXTRA_CFLAGS = "${CFLAGS}" | 14 | export EXTRA_CFLAGS = "${CFLAGS}" |
15 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd" | 15 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog" |
16 | 16 | ||
17 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" | 17 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" |
18 | FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog.conf*" | ||
18 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" | 19 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" |
20 | FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc" | ||
19 | 21 | ||
20 | FILES_${PN} += "${datadir}/udhcpc" | 22 | INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-udhcpc" |
21 | FILES_${PN} += "${sysconfdir}/init.d/busybox-udhcpc" | ||
22 | 23 | ||
23 | INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd" | ||
24 | INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" | 24 | INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" |
25 | INITSCRIPT_NAME_${PN}-syslog = "syslog" | ||
25 | INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" | 26 | INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" |
26 | INITSCRIPT_NAME_${PN} = "syslog busybox-udhcpc" | 27 | INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc" |
27 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${PN}" | 28 | CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf.${PN}" |
29 | |||
30 | RRECOMMENDS_${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) |
30 | INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ." | 33 | INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ." |
31 | 34 | ||
32 | inherit cml1 update-rc.d | 35 | inherit 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 | ||
124 | pkg_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 | ||
160 | pkg_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 |