summaryrefslogtreecommitdiffstats
path: root/rsyslog.service.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-07 22:39:37 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-09 09:33:20 +0100
commit906b04e97e8e1f8f09110e6e13caad87862f4736 (patch)
treecdf192149d5d96e10a231c6e2c91b49e467687fe /rsyslog.service.in
parent22f36ffbbd0c4e0fe1bfe331cb7ca15ec6ae80aa (diff)
downloadrsyslog-906b04e97e8e1f8f09110e6e13caad87862f4736.tar.gz
rsyslog-906b04e97e8e1f8f09110e6e13caad87862f4736.tar.xz
rsyslog-906b04e97e8e1f8f09110e6e13caad87862f4736.zip
systemd: use standard syslog.socket unit
In systemd we now have a standard socket unit for /dev/log called syslog.socket. This unit can be shared between an early boot mini syslog and the full syslog implementation started later on. The mini syslog is shipped along systemd and does nothing but simply forward the data received through /dev/log to the kernel log buffer (i.e. kmsg, as visible by dmesg). It is run during early boot, and then as soon as rsyslog starts up it is terminated, so that rsyslog can take over the /dev/log socket. Since one of the first things rsyslog does after starting up is flushing the kernel log buffer to disk we end up with all data from early boot up in syslog. This patch changes two things: removes rsyslog.socket and instead configures rsyslog.service to take possession of syslock.socket. And secondly includes a PreStart line to terminate the running syslog bridge instance.
Diffstat (limited to 'rsyslog.service.in')
-rw-r--r--rsyslog.service.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/rsyslog.service.in b/rsyslog.service.in
index 2bcde528..03db596e 100644
--- a/rsyslog.service.in
+++ b/rsyslog.service.in
@@ -2,9 +2,10 @@
Description=System Logging Service
[Service]
+ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
ExecStart=@sbindir@/rsyslogd -n -c5
ExecReload=/bin/kill -HUP $MAINPID
+Sockets=syslog.socket
[Install]
WantedBy=multi-user.target
-Also=rsyslog.socket