All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] busybox-syslog: respect /etc/syslog-startup.conf in systemd
@ 2013-07-18  7:05 Qi.Chen
  2013-07-18  7:05 ` [PATCH 1/1] " Qi.Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Qi.Chen @ 2013-07-18  7:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

From: Chen Qi <Qi.Chen@windriver.com>

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(-)

-- 
1.7.9.5



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] busybox-syslog: respect /etc/syslog-startup.conf in systemd
  2013-07-18  7:05 [PATCH 0/1] busybox-syslog: respect /etc/syslog-startup.conf in systemd Qi.Chen
@ 2013-07-18  7:05 ` Qi.Chen
  2013-07-18 17:07   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Qi.Chen @ 2013-07-18  7:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

From: Chen Qi <Qi.Chen@windriver.com>

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]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 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(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index acd2bfb..1095be6 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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
diff --git a/meta/recipes-core/busybox/files/busybox-syslog.service.in b/meta/recipes-core/busybox/files/busybox-syslog.service.in
index 2e04321..f849a61 100644
--- a/meta/recipes-core/busybox/files/busybox-syslog.service.in
+++ b/meta/recipes-core/busybox/files/busybox-syslog.service.in
@@ -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]
diff --git a/meta/recipes-core/busybox/files/syslog b/meta/recipes-core/busybox/files/syslog
index 2944d3d..98eda80 100644
--- a/meta/recipes-core/busybox/files/syslog
+++ b/meta/recipes-core/busybox/files/syslog
@@ -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
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] busybox-syslog: respect /etc/syslog-startup.conf in systemd
  2013-07-18  7:05 ` [PATCH 1/1] " Qi.Chen
@ 2013-07-18 17:07   ` Burton, Ross
  2013-07-19  1:59     ` ChenQi
  0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2013-07-18 17:07 UTC (permalink / raw)
  To: Qi.Chen; +Cc: qingtao.cao, openembedded-core

On 18 July 2013 08:05,  <Qi.Chen@windriver.com> 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.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.

(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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] busybox-syslog: respect /etc/syslog-startup.conf in systemd
  2013-07-18 17:07   ` Burton, Ross
@ 2013-07-19  1:59     ` ChenQi
  0 siblings, 0 replies; 4+ messages in thread
From: ChenQi @ 2013-07-19  1:59 UTC (permalink / raw)
  To: Burton, Ross; +Cc: qingtao.cao, openembedded-core

On 07/19/2013 01:07 AM, Burton, Ross wrote:
> On 18 July 2013 08:05,  <Qi.Chen@windriver.com> 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.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.
> (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.

>    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
>
> Ross
>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-19  1:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-18  7:05 [PATCH 0/1] busybox-syslog: respect /etc/syslog-startup.conf in systemd Qi.Chen
2013-07-18  7:05 ` [PATCH 1/1] " Qi.Chen
2013-07-18 17:07   ` Burton, Ross
2013-07-19  1:59     ` ChenQi

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.