#ANNEXE 3 - syslogd-listfiles.msyslog.patch #========================================== # #syslogd-listfiles.msyslog.patch : # --- syslogd-listfiles.orig Fri Mar 14 17:25:30 2003 +++ syslogd-listfiles Wed Mar 19 11:56:52 2003 @@ -14,6 +14,12 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. +### 19/03/03 +# +# Gestion d'un fichier de configuration syslog.conf a la fois au format +# syslog standard et au format modular-syslog +# + $conf = "/etc/syslog.conf"; $opt_daily = 1; $opt_all = 0; @@ -109,8 +115,9 @@ $line .= $_; chop ($line) if (/\\$/); if (!/\\$/) { - $line =~ s/\s+/\t/; - $line =~ s/\t-/\t/; + $line =~ s/\s+/\t/g; + $line =~ s/\t-/\t/g; + if ($line =~ /\t%/ ) { $line =~ s/%.*\t(\/)/$1/; } push (@lines, $line) if ($line =~ /\t\/(?!dev\/)/); $line = ""; }