aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/busybox
diff options
context:
space:
mode:
authorMichael Smith <msmith@cbnco.com>2009-06-07 16:43:25 -0400
committerPhil Blundell <philb@gnu.org>2009-06-08 10:39:28 +0100
commit77ae409e00a4ae61404a74e04e548aeec1e90a8f (patch)
treec29304a4da88d0568c40abc61593e17f02d65c34 /recipes/busybox
parent654cb590ae11f3ada8ed877a6f81f14cabe7b506 (diff)
downloadopenembedded-77ae409e00a4ae61404a74e04e548aeec1e90a8f.tar.gz
busybox: Split syslog initscript into busybox-syslog
The same is already done for httpd and udhcpd. This fixes Busybox deb upgrades: the prerm script was failing because the last command "/etc/init.d/syslog stop", added by the update-rc.d class, runs after the /bin/sh symlink has been removed. Many images expect busybox to contain the syslog initscript, so busybox RRECOMMENDS busybox-syslog. busybox-{syslog,httpd,udhcpd} now RDEPEND on busybox, for consistency with other packages in the recipe (e.g. busybox-mdev). Signed-off-by: Michael Smith <msmith@cbnco.com>
Diffstat (limited to 'recipes/busybox')
-rw-r--r--recipes/busybox/busybox.inc27
1 files changed, 20 insertions, 7 deletions
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index e056ad1141..7b9b92940f 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -33,26 +33,37 @@ SRC_URI_append_nylon = " file://xargs-double-size.patch;patch=1"
export EXTRA_CFLAGS = "${CFLAGS}"
EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
-PACKAGES =+ "${PN}-mountall ${PN}-httpd ${PN}-udhcpd"
+PACKAGES =+ "${PN}-mountall ${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
+
# We need this RRECOMMENDS because libc dlopens libgcc
# and shlib mechanism can not detect it because its not
# listed in the NEEDED field.
RRECOMMENDS += "libgcc"
+
FILES_${PN}-mountall = "${sysconfdir}/default/mountall"
RDEPENDS_${PN} += "${PN}-mountall"
+
+# Make busybox recommend busybox-syslog for those images that expect it
+RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
+
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
-INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
+INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
-INITSCRIPT_NAME_${PN} = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf"
# This disables the syslog startup links in slugos (see slugos-init)
-INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ."
+INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ."
+
+RDEPENDS_${PN}-httpd += "${PN}"
+RDEPENDS_${PN}-syslog += "${PN}"
+RDEPENDS_${PN}-udhcpd += "${PN}"
# Use gcc for linking so LDFLAGS actually makes sense
LD = "${CC} -nostdlib"
@@ -89,8 +100,10 @@ do_install () {
install -m 0755 ${S}/busybox ${D}${base_bindir}
ln -sf busybox ${D}${base_bindir}/sh
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ fi
if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
fi