From d3c30a19101eacd3c339a31578f9bcae81cc08fe Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Thu, 11 Sep 2014 04:55:03 -0400 Subject: systemd: enable syslog.socket by default The syslog daemon behaviour in our systemd system should be like the following 1. If ForwardToSyslog is disabled, no daemon should be started. 2. If ForwardToSyslog is enabled, daemon should be started via socket activation. This is very important for OE based system. Because unlike other distros, OE allows serveral syslog packages installed into one image, using ALTERNATIVE mechanism to manage them. If the syslog service is started regardless of socket activation, things crash. For example, if there's 'WantedBy=multi-user.target' in the '[Install]' section of busybox-syslog.service file, then this service would be started anyway, even if syslog.service doesn't point to it. In this case, /sbin/syslogd in busybox-syslog.service might be from other syslog packages like sysklogd or rsyslog. This patch is series of patches to implement the above behaviour. The syslog.socket needs to be enabled by default so that other syslog service could correctly be activated via socket activation at runtime. Signed-off-by: Chen Qi --- meta/recipes-core/systemd/systemd_216.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb index 331da99479..e3a0760a40 100644 --- a/meta/recipes-core/systemd/systemd_216.bb +++ b/meta/recipes-core/systemd/systemd_216.bb @@ -148,6 +148,8 @@ do_install() { # Enable journal to forward message to syslog daemon sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf + # Enable syslog.socket by default, this is specific to our system + ln -sf ../syslog.socket ${D}${systemd_unitdir}/system/sockets.target.wants/syslog.socket } do_install_ptest () { -- cgit 1.2.3-korg