Debian 5.0 uses rsyslog
authorJamie Cameron <jcameron@webmin.com>
Mon, 18 Aug 2008 19:36:24 +0000 (19:36 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 18 Aug 2008 19:36:24 +0000 (19:36 +0000)
syslog/CHANGELOG
syslog/config-debian-linux-4.0 [moved from syslog/config-debian-linux-4.0-* with 100% similarity]
syslog/config-debian-linux-5.0-* [new file with mode: 0644]
syslog/syslog-lib.pl

index 8c7e627..bbaac8e 100644 (file)
@@ -10,3 +10,5 @@ Added a Module Config option to specifying other log files that should be search
 ---- Changes since 1.380 ----
 On Debian systems, use a syslog restart to tell it to re-open log files, as a HUP signal is not reliable.
 On Fedora 8, use rsyslog by default instead of syslog.
+---- Changes since 1.430 ----
+Added support for rsyslogd, as seen by default on Debian 5.0.
diff --git a/syslog/config-debian-linux-5.0-* b/syslog/config-debian-linux-5.0-*
new file mode 100644 (file)
index 0000000..a30b3fd
--- /dev/null
@@ -0,0 +1,18 @@
+pri_all=1
+syslogd=/usr/sbin/rsyslogd
+m4_conf=0
+syslog_conf=/etc/rsyslog.conf
+pri_dir=1
+pid_file=/var/run/rsyslogd.pid
+facilities=auth authpriv cron daemon kern lpr mail mark news syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7
+m4_path=
+sync=1
+pipe=1
+tags=0
+lines=20
+socket=0
+start_cmd=/etc/init.d/rsyslog start
+restart_cmd=/etc/init.d/rsyslog reload
+signal_cmd=/etc/init.d/rsyslog restart ; /etc/init.d/klogd restart
+compressed=1
+others=1
index 9e5eea9..bb4865f 100644 (file)
@@ -7,6 +7,8 @@ do '../ui-lib.pl';
 %access = &get_module_acl();
 
 # get_config()
+# Parses the syslog configuration file into an array ref of hash refs, one
+# for each log file or destination
 sub get_config
 {
 local $lnum = 0;
@@ -30,8 +32,12 @@ while($line = <CONF>) {
                        last if ($line !~ s/\\$//);
                        }
                }
-       if ($line =~ /^(#*)\s*([^#\s]+\.\S+)\s+(\S+)$/ ||
-           $line =~ /^(#*)\s*([^#\s]+\.\S+)\s+(\|.*)$/) {
+       if ($line =~ /^\$(\S+)\s*(\S*)/) {
+               # rsyslog special directive - ignored for now
+               }
+       elsif ($line =~ /^(#*)\s*([^#\s]+\.\S+)\s+(\S+)$/ ||
+              $line =~ /^(#*)\s*([^#\s]+\.\S+)\s+(\|.*)$/) {
+               # Regular log destination
                local $act = $3;
                local $log = { 'active' => !$1,
                               'sel' => [ split(/;/, $2) ],
@@ -66,6 +72,7 @@ while($line = <CONF>) {
                push(@rv, $log);
                }
        elsif ($line =~ /^(#?)!(\S+)$/) {
+               # Start of tagged section, as seen on BSD
                push(@rv, { 'tag' => $2,
                            'index' => scalar(@rv),
                            'line' => $lnum,