]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox: rename syslog.conf to syslog-startup.conf
authorJoshua Lock <josh@linux.intel.com>
Mon, 2 Jan 2012 21:50:32 +0000 (13:50 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Jan 2012 12:02:36 +0000 (12:02 +0000)
Busybox 1.19 introduced basic support for an rsyslog inspired syslog.conf
whereas we've been shipping syslog.conf as a file to be sourced by the
syslog init script in order to configure which options busybox's syslog is
started with.

Busybox 1.19 in syslog mode chokes on our syslog.conf and doesn't start.

This patch renames the syslog.conf we ship to syslog-startup.conf in order
to prevent busybox trying to parse the file as an rsyslog style syslog.conf

Fixes [YOCTO #1848]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/busybox/busybox.inc
meta/recipes-core/busybox/busybox_1.19.3.bb
meta/recipes-core/busybox/files/syslog
meta/recipes-core/busybox/files/syslog-startup.conf [moved from meta/recipes-core/busybox/files/syslog.conf with 61% similarity]

index 07ca782341a3fb1c995b90e7b8d4b554a0754bfb..a107a020c169b425db046cf8de5a343694564c04 100644 (file)
@@ -17,7 +17,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"
 PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev"
 
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog.conf*"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf*"
 FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc ${sysconfdir}/init.d/busybox-udhcpc"
@@ -30,7 +30,7 @@ INITSCRIPT_NAME_${PN}-mdev = "mdev"
 INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
 INITSCRIPT_NAME_${PN}-udhcpc = "busybox-udhcpc" 
-CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf.${BPN}"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
 CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
 
 RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
@@ -168,7 +168,7 @@ do_install () {
 
        if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
                install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN}
-               install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN}
+               install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN}
        fi
        if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
                install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
@@ -249,7 +249,7 @@ pkg_postinst_${PN} () {
 
 pkg_postinst_${PN}-syslog () {
        update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${BPN} 50
-       update-alternatives --install ${sysconfdir}/syslog.conf syslog-conf syslog.conf.${BPN} 50
+       update-alternatives --install ${sysconfdir}/syslog-startup.conf syslog-startup-conf syslog-startup.conf.${BPN} 50
 }
 
 pkg_prerm_${PN} () {
@@ -293,5 +293,5 @@ pkg_prerm_${PN}-syslog () {
        fi
 
        update-alternatives --remove syslog-init syslog.${BPN}
-       update-alternatives --remove syslog-conf syslog.conf.${BPN}
+       update-alternatives --remove syslog-startup-conf syslog-startup.conf.${BPN}
 }
index 73602199e97260151098feb717ed2be185092e85..f591856a367e2b21316a7c67bee905170c32c972 100644 (file)
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://udhcpscript.patch \
@@ -20,7 +20,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://hwclock.sh \
            file://mount.busybox \
            file://syslog \
-           file://syslog.conf \
+           file://syslog-startup.conf \
            file://mdev \
            file://mdev.conf \
            file://umount.busybox \
index 9edaa15053336c7eac057620c9b9499747f3b70e..5ff6599ee87441d778b6f53e1fb3a54ef5c1e0a8 100644 (file)
@@ -10,8 +10,8 @@
 
 set -e
 
-if [ -f /etc/syslog.conf ]; then
-       . /etc/syslog.conf
+if [ -f /etc/syslog-startup.conf ]; then
+       . /etc/syslog-startup.conf
        LOG_LOCAL=0
        LOG_REMOTE=0
        for D in $DESTINATION; do
similarity index 61%
rename from meta/recipes-core/busybox/files/syslog.conf
rename to meta/recipes-core/busybox/files/syslog-startup.conf
index d4a0e02f5b78c02c2aaf97b338ef344680996ed1..903a60ce8b438e08e46b4e70c8d215ff0849dfba 100644 (file)
@@ -1,5 +1,8 @@
-DESTINATION="buffer"           # log destinations (buffer file remote)
-MARKINT=20                     # intervall between --mark-- entries
+# This configuration file is used by the busybox syslog init script,
+# /etc/init.d/syslog[.busybox] to set syslog configuration at start time.
+
+DESTINATION=buffer             # log destinations (buffer file remote)
+MARKINT=20                     # interval between --mark-- entries
 LOGFILE=/var/log/messages      # where to log (file)
 REMOTE=loghost:514             # where to log (syslog remote)
 REDUCE=no                      # reduce-size logging