]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Use syslog-ng's system() automagic instead of hard coding
authorTollef Fog Heen <tfheen@err.no>
Thu, 27 Nov 2014 15:42:10 +0000 (16:42 +0100)
committerTollef Fog Heen <tfheen@err.no>
Thu, 27 Nov 2014 15:42:10 +0000 (16:42 +0100)
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.

modules/syslog-ng/templates/syslog-ng.conf.erb

index 7f78680b70b475ed658c091239602b5b876402a1..f5d5036b29ff5dbfa6f90d4c19a91c32276c36d4 100644 (file)
@@ -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") -%>