busybox-syslog: respect /etc/syslog-startup.conf in systemd
cover busybox-syslog: respect /etc/syslog-startup.conf in systemd
From: Chen Qi <[email protected]>
The following changes since commit 3dee534f1e25109e0bdb681de0746c336f4b8840:
lib/oeqa: fix dependecy check (2013-07-16 10:04:17 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/busybox-syslog-systemd
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/busybox-syslog-systemd
Chen Qi (1):
busybox-syslog: respect /etc/syslog-startup.conf in systemd
meta/recipes-core/busybox/busybox.inc | 2 +- .../busybox/files/busybox-syslog.service.in | 3 +-- meta/recipes-core/busybox/files/syslog | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/1 busybox-syslog: respect /etc/syslog-startup.conf in systemd
From: Chen Qi <[email protected]>
Now we've used busybox-syslog as a replacement for systemd's syslog service. Currently, there are two problems.
1. The configuration file, /etc/syslog-startup.conf, is ignored. This is really confusing, as we are used to the behaviour of changing the configuration in /etc/syslog-startup.conf for the syslog service. This is actually a weekly test case.
2. The /etc/init.d/syslog is installed, but it has no real usage in systemd based systems.
This patch solves the above two problems by changing the busybox-syslog. service file to let the /etc/init.d/syslog script start syslog service. The /etc/init.d/syslog file is actually a wrapper in this situation.
[YOCTO #4860]
[YOCOT #4837]
--- meta/recipes-core/busybox/busybox.inc | 2 +- .../busybox/files/busybox-syslog.service.in | 3 +-- meta/recipes-core/busybox/files/syslog | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-)
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -267,7 +267,7 @@ do_install () { if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -d ${D}${systemd_unitdir}/system - sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-syslog.service.in \ + sed 's,@sysconfdir@,${sysconfdir},g' < ${WORKDIR}/busybox-syslog.service.in \ > ${D}${systemd_unitdir}/system/busybox-syslog.service sed 's,@base_sbindir@,${base_sbindir},g' < ${WORKDIR}/busybox-klogd.service.in \ > ${D}${systemd_unitdir}/system/busybox-klogd.service
meta/recipes-core/busybox/files/busybox-syslog.service.in +1 -2
@@ -3,8 +3,7 @@ Description=System Logging Service Wants=busybox-klogd.service [Service] -EnvironmentFile=-/etc/default/busybox-syslog -ExecStart=@base_sbindir@/syslogd -n $OPTIONS +ExecStart=@sysconfdir@/init.d/syslog systemd Sockets=syslog.socket [Install]
meta/recipes-core/busybox/files/syslog +7 -0
@@ -68,6 +68,13 @@ case "$1" in $0 stop $0 start ;; + systemd) + # This action is only for systemd based images. It's kind of ugly here. + # But as we're using busybox-syslog as the syslog service in systemd images, + # and we want to respect the configurations in /etc/syslog-startup.conf, + # this is an easy way to achieve this goal without duplicating codes. + /sbin/syslogd -n $SYSLOG_ARGS + ;; *) echo "Usage: syslog { start | stop | restart }" >&2 exit 1
Signature · 1 line
1.7.9.5
Quoted 10 lines · On 18 July 2013 08:05, <[email protected]> wrote:
1. The configuration file,
/etc/syslog-startup.conf, is ignored. This is really confusing, as we are used to the behaviour of changing the configuration in/etc/syslog-startup.conffor the syslog service. This is actually a weekly test case.
2. The/etc/init.d/syslogis installed, but it has no real usage in systemd based systems.This patch solves the above two problems by changing the busybox-syslog. service file to let the
/etc/init.d/syslogscript start syslog service. The/etc/init.d/syslogfile is actually a wrapper in this situation.
(2) can be solved by not installing it (and there's work on-going to make the init classes delete scripts that are installed as appropriate). I don't like this solution for (1) to be honest - I'd prefer to see the logic in a central wrapper that the service (and probably the init script) could invoke.
Ross
Quoted 8 lines · Ross
Quoted 7 lines · On 18 July 2013 08:05, <[email protected]> wrote:
1. The configuration file,
/etc/syslog-startup.conf, is ignored. This is really confusing, as we are used to the behaviour of changing the configuration in/etc/syslog-startup.conffor the syslog service. This is actually a weekly test case.
2. The/etc/init.d/syslogis installed, but it has no real usage in systemd based systems.
Quoted 6 lines
Quoted 3 lines
This patch solves the above two problems by changing the busybox-syslog. service file to let the
/etc/init.d/syslogscript start syslog service. The/etc/init.d/syslogfile is actually a wrapper in this situation.(2) can be solved by not installing it (and there's work on-going to make the init classes delete scripts that are installed as appropriate).
Great. Thanks.
Quoted 3 lines
I don't like this solution for (1) to be honest - I'd
prefer to see the logic in a central wrapper that the service (and probably the init script) could invoke.
Yes, that makes more sense. I'll rework on this patch. Thanks for you review.
Best Regards,
Chen Qi
Quoted 4 lines
Ross