[OE-core] [PATCH V3 1/4] systemd: enable syslog.socket by default
Chen Qi
Qi.Chen at windriver.com
Sun Sep 28 03:00:17 UTC 2014
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 <Qi.Chen at windriver.com>
---
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 331da99..e3a0760 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 () {
--
1.9.1
More information about the Openembedded-core
mailing list