From a2755641cae03dc0ce58f3986df91e3deca61070 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Tue, 22 Sep 2009 23:06:35 +0100 Subject: [PATCH] move syslog-ng.conf to a template for bsd Signed-off-by: Stephen Gran --- modules/debian-org/manifests/init.pp | 2 +- .../syslog-ng.conf => templates/syslog-ng.conf.erb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) rename files/etc/syslog-ng/syslog-ng.conf => templates/syslog-ng.conf.erb (97%) diff --git a/modules/debian-org/manifests/init.pp b/modules/debian-org/manifests/init.pp index 9e4483b2e..78e73840d 100644 --- a/modules/debian-org/manifests/init.pp +++ b/modules/debian-org/manifests/init.pp @@ -77,7 +77,7 @@ class debian-org { ; "/etc/syslog-ng/syslog-ng.conf": - source => "puppet:///files/etc/syslog-ng/syslog-ng.conf", + content => template("syslog-ng.conf"), require => Package["syslog-ng"], notify => Exec["syslog-ng reload"], ; diff --git a/files/etc/syslog-ng/syslog-ng.conf b/templates/syslog-ng.conf.erb similarity index 97% rename from files/etc/syslog-ng/syslog-ng.conf rename to templates/syslog-ng.conf.erb index d4afc62c4..637250b7b 100644 --- a/files/etc/syslog-ng/syslog-ng.conf +++ b/templates/syslog-ng.conf.erb @@ -83,11 +83,19 @@ options { source s_all { # 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" log_prefix("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" log_prefix("kernel: ")); +<%end%> # use the following line if you want to receive remote UDP logging messages # (this is equivalent to the "-r" syslogd flag) # udp(); -- 2.20.1