From: Chen Qi Date: Thu, 11 Sep 2014 08:55:03 +0000 (-0400) Subject: systemd: enable syslog.socket by default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3c30a19101eacd3c339a31578f9bcae81cc08fe;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb index 331da994795..e3a0760a40f 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 () {