]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
drop support for syslog-ng 2, add support for syslog-ng 3.3, version string is now...
authorMartin Zobel-Helas <zobel@debian.org>
Tue, 15 Nov 2011 08:55:14 +0000 (09:55 +0100)
committerMartin Zobel-Helas <zobel@debian.org>
Tue, 15 Nov 2011 08:55:14 +0000 (09:55 +0100)
Signed-off-by: Martin Zobel-Helas <zobel@debian.org>
modules/debian-org/lib/facter/software.rb
modules/syslog-ng/templates/syslog-ng.conf.erb

index 237f9fa7c63694e2520508c9d802e289f578e8a9..1f05d486dbb1f66fde1166af69db636710b4869d 100644 (file)
@@ -69,7 +69,7 @@ Facter.add("php5suhosin") do
 end
 Facter.add("syslogversion") do
        setcode do
-               %x{dpkg-query -W -f='${Version}\n' syslog-ng | cut -b1}.chomp
+               %x{dpkg-query -W -f='${Version}\n' syslog-ng | cut -b1-3}.chomp
        end
 end
 Facter.add("rsyncd") do
index cb5c67c3858733ae8e4b392a1e976aeda4bdbc6c..23f53934be7b00223cea0dfe7bd1a9f86a54ad3d 100644 (file)
@@ -1,6 +1,9 @@
-<%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
 @version: 3.0
 <%- end -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.3" -%>
+@version: 3.3
+<%- end -%>
 ##
 ## 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
@@ -42,7 +45,12 @@ options {
         #sync(0);
 
         # the number of lines fitting in the output queue
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
         log_fifo_size(2048);
+<%- end -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.3" -%>
+        log_fifo_size(10000);
+<%- end -%>
 
         # enable or disable directory creation for destination files
         create_dirs(yes);
@@ -98,22 +106,14 @@ source s_local {
         # function to send logs to)
         unix-stream("/dev/log");
         # messages from the kernel
-<%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
-        file("/proc/kmsg" log_prefix("kernel: "));
-<%- else -%>
         file("/proc/kmsg" program_override("kernel: "));
-<%- end -%>
 <%- 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
-<%- if has_variable?("syslogversion") and syslogversion.to_s == "2" -%>
-        file("/dev/klog" log_prefix("kernel: "));
-<%- else -%>
         file("/dev/klog" program_override("kernel: "));
 <%- end -%>
-<%- end -%>
 <%- if hostname == "paganini" -%>
         # use the following line if you want to receive remote UDP logging messages
         # (this is equivalent to the "-r" syslogd flag)
@@ -399,7 +399,7 @@ log {
 <%- end -%>
 
 
-<%- if has_variable?("syslogversion") and syslogversion.to_s == "3" -%>
+<%- if has_variable?("syslogversion") and syslogversion.to_s == "3.1" -%>
   <%- if hostname != "heininen" -%>
 destination loghost-heininen {
        tcp("heininen.debian.org" port (5140)