diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2013-09-03 10:14:50 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-06 23:03:21 +0100 |
| commit | 101662d357adfb200c5b38b71494fced1fda5607 (patch) | |
| tree | fd7425fe431c35fec66092b9b2890a6f0da49dd1 /meta/recipes-core | |
| parent | 18dfcc5139f30b74c7f3093d7c3509b6bb59861e (diff) | |
| download | poky-101662d357adfb200c5b38b71494fced1fda5607.tar.gz | |
busybox-syslog: add configuration file /etc/syslog.conf
By default, busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, but it
doesn't ship a configuration file.
This patch adds a configuration file (/etc/syslog.conf) to the
busybox-syslog package. This configuration file mainly serves as a
placeholder now.
The advantages of this change are:
1. Make the users aware of the fact that the /etc/syslog.conf file
will actually be parsed by busybox's syslogd utility. And configuring
that file will change the logging behaviour.
2. In a systemd based system, this file will prevent the same configuration
file provided by the sysklogd package from messing things up.
[YOCTO #5066]
(From OE-Core rev: b7f6688f0700a1575037362af7a8ca94dccce471)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
| -rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 6 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox_1.21.1.bb | 1 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/files/syslog.conf | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index b4cf20a77e..b3d0cd25de 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc | |||
| @@ -21,7 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}" | |||
| 21 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" | 21 | PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" |
| 22 | 22 | ||
| 23 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" | 23 | FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" |
| 24 | FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" | 24 | FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" |
| 25 | FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" | 25 | FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" |
| 26 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" | 26 | FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" |
| 27 | FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" | 27 | FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" |
| @@ -233,6 +233,7 @@ do_install () { | |||
| 233 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then | 233 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then |
| 234 | install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} | 234 | install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} |
| 235 | install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} | 235 | install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} |
| 236 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN} | ||
| 236 | fi | 237 | fi |
| 237 | if grep "CONFIG_CROND=y" ${B}/.config; then | 238 | if grep "CONFIG_CROND=y" ${B}/.config; then |
| 238 | install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ | 239 | install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ |
| @@ -290,6 +291,9 @@ inherit update-alternatives | |||
| 290 | 291 | ||
| 291 | ALTERNATIVE_PRIORITY = "50" | 292 | ALTERNATIVE_PRIORITY = "50" |
| 292 | 293 | ||
| 294 | ALTERNATIVE_${PN}-syslog += "syslog-conf" | ||
| 295 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
| 296 | |||
| 293 | python () { | 297 | python () { |
| 294 | if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): | 298 | if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): |
| 295 | pn = d.getVar('PN', True) | 299 | pn = d.getVar('PN', True) |
diff --git a/meta/recipes-core/busybox/busybox_1.21.1.bb b/meta/recipes-core/busybox/busybox_1.21.1.bb index 784c924d50..f766beec03 100644 --- a/meta/recipes-core/busybox/busybox_1.21.1.bb +++ b/meta/recipes-core/busybox/busybox_1.21.1.bb | |||
| @@ -17,6 +17,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
| 17 | file://mount.busybox \ | 17 | file://mount.busybox \ |
| 18 | file://syslog \ | 18 | file://syslog \ |
| 19 | file://syslog-startup.conf \ | 19 | file://syslog-startup.conf \ |
| 20 | file://syslog.conf \ | ||
| 20 | file://busybox-syslog.default \ | 21 | file://busybox-syslog.default \ |
| 21 | file://mdev \ | 22 | file://mdev \ |
| 22 | file://mdev.conf \ | 23 | file://mdev.conf \ |
diff --git a/meta/recipes-core/busybox/files/syslog.conf b/meta/recipes-core/busybox/files/syslog.conf new file mode 100644 index 0000000000..75bb6309ab --- /dev/null +++ b/meta/recipes-core/busybox/files/syslog.conf | |||
| @@ -0,0 +1 @@ | |||
| # /etc/syslog.conf Configuration file for busybox's syslogd utility | |||
