From: Tollef Fog Heen Date: Thu, 27 Nov 2014 15:42:10 +0000 (+0100) Subject: Use syslog-ng's system() automagic instead of hard coding X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=a887b89923ce1844ab3f85930949bc45e61c445e;p=mirror%2Fdsa-puppet.git Use syslog-ng's system() automagic instead of hard coding syslog-ng has a plugin that DTRT on various platforms. Use that instead of hard coding where to grab messages from. As a nice bonus, this works correctly with systemd. --- diff --git a/modules/syslog-ng/templates/syslog-ng.conf.erb b/modules/syslog-ng/templates/syslog-ng.conf.erb index 7f78680b7..f5d5036b2 100644 --- a/modules/syslog-ng/templates/syslog-ng.conf.erb +++ b/modules/syslog-ng/templates/syslog-ng.conf.erb @@ -5,6 +5,8 @@ <%- else -%> @version: 3.3 <%- end -%> +@include "scl.conf" + ## ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git @@ -104,19 +106,7 @@ options { source s_local { # message generated by Syslog-NG internal(); -<%- if kernel == 'Linux' -%> - # standard Linux log source (this is the default place for the syslog() - # function to send logs to) - unix-stream("/dev/log"); - # messages from the kernel - file("/proc/kmsg" program_override("kernel: ")); -<%- else -%> - # standard Linux log source (this is the default place for the syslog() - # function to send logs to) - unix-dgram("/var/run/log"); - # messages from the kernel - file("/dev/klog" program_override("kernel: ") follow-freq(1)); -<%- end -%> + system(); }; <%- if (hostname == "lotti") || (hostname == "lully") || (hostname == "loghost-grnet-01") -%>