From: Chris Larson <kergoth@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Chris Larson <chris_larson@mentor.com>
Subject: [PATCH] busybox: move syslog config to /etc/default
Date: Tue, 11 Jan 2011 18:43:06 -0700 [thread overview]
Message-ID: <1294796586-24723-1-git-send-email-kergoth@gmail.com> (raw)
From: Chris Larson <chris_larson@mentor.com>
The busybox syslog syslog.conf is parsed by the /etc/init.d script, not by the
syslog process itself, so it belongs in /etc/default. In addition, the file
format is *completely* different from the standard sysklogd configuration, so
while we should resolve the file conflict between busybox-syslog and sysklogd,
we should not use update-alternatives for it, so this is a cleaner solution.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
recipes/busybox/busybox.inc | 13 +++++++++----
recipes/busybox/files/syslog | 4 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index a9d1e6e..1106910 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
SECTION = "base"
PRIORITY = "required"
-INC_PR = "r38"
+INC_PR = "r39"
SRC_URI = "\
file://busybox-cron \
@@ -47,7 +47,8 @@ RDEPENDS_${PN} += "${PN}-mountall"
RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} \
+ ${sysconfdir}/default/syslog"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
@@ -58,7 +59,7 @@ INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-udhcpd"
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
-CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf"
+CONFFILES_${PN}-syslog = "${sysconfdir}/default/syslog"
# This disables the syslog startup links in slugos (see slugos-init)
INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ."
@@ -168,7 +169,11 @@ do_install () {
if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
- install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ sed -i -e 's,/etc/default/syslog,${sysconfdir}/default/syslog,' \
+ ${D}${sysconfdir}/init.d/syslog.${PN}
+
+ install -d ${D}${sysconfdir}/default
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/default/syslog
fi
if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
diff --git a/recipes/busybox/files/syslog b/recipes/busybox/files/syslog
index 61d273b..6e86346 100644
--- a/recipes/busybox/files/syslog
+++ b/recipes/busybox/files/syslog
@@ -5,8 +5,8 @@
# Configuration file added by <bruno.randolf@4g-systems.biz>
set -e
-if [ -f /etc/syslog.conf ]; then
- . /etc/syslog.conf
+if [ -f /etc/default/syslog ]; then
+ . /etc/default/syslog
LOG_LOCAL=0
LOG_REMOTE=0
for D in $DESTINATION; do
--
1.7.2.3
next reply other threads:[~2011-01-12 1:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 1:43 Chris Larson [this message]
2011-01-12 7:32 ` [PATCH] busybox: move syslog config to /etc/default Koen Kooi
2011-01-12 7:32 ` Koen Kooi
2011-01-12 7:33 ` Khem Raj
2011-01-12 14:21 ` Chris Larson
2011-01-12 7:43 ` Steffen Sledz
2011-01-12 14:22 ` Chris Larson
2011-01-19 20:10 ` Martin Jansa
2011-01-20 1:00 ` Chris Larson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1294796586-24723-1-git-send-email-kergoth@gmail.com \
--to=kergoth@gmail.com \
--cc=chris_larson@mentor.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.