Re: Fwd: clam-update service script fail if "LogTime yes" specified in freshclam.conf
Mike Tremaine <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
> ---------- Forwarded message ---------- > From: Frantisek Hanzlik <[email protected]> > Date: Wed, Dec 24, 2008 at 3:26 AM > Subject: clam-update service script fail if "LogTime yes" specified in > freshclam.conf > To: [email protected] > > > (I tried sent this report to mailing list, but as I'm not member of it, message > was rejected. But I'm no developer...) > > Hello, > > I found minor problem: If "LogTime yes" option is specified in > "/etc/freshclam.conf" freshclam config file, then all messages in logfile > are preceeded by datetime field in form: > > Tue Dec 23 17:02:09 2008 -> daily.cld is up to date (version: 8794, > sigs: 41128, f-level: 38, builder: ccordes) > Tue Dec 23 20:02:09 2008 -> -------------------------------------- > Tue Dec 23 20:02:09 2008 -> ClamAV update process started at Tue Dec > 23 20:02:09 2008 > Tue Dec 23 20:02:10 2008 -> main.cvd is up to date (version: 49, sigs: > 437972, f-level: 35, builder: sven) > Tue Dec 23 20:02:10 2008 -> Downloading daily-8795.cdiff [100%] > Tue Dec 23 20:02:10 2008 -> daily.cld updated (version: 8795, sigs: > 41128, f-level: 38, builder: neo) > Tue Dec 23 20:02:10 2008 -> Database updated (479100 signatures) from > db.cz.clamav.net (IP: 194.228.41.13) > Tue Dec 23 23:02:09 2008 -> -------------------------------------- > > thus parsing condition (anchored to line start): > > } elsif (($Date) = ($ThisLine =~ /^ClamAV update process started at > \w{3} (\w{3} [\d ]\d ..:..:.. \d{4})$/)) { > > cannot be never satisfied, and log processing ends with > "No updates detected in the log ..." message. > > -- Added this line [mgt@dwarfstar services]$ cvs diff clam-update Index: clam-update =================================================================== RCS file: /var/cvs/logwatch/scripts/services/clam-update,v retrieving revision 1.20 diff -r1.20 clam-update 106a107,108 > #If LogTime = yes in freshclam.conf then strip it > $ThisLine =~ s/^... ... .. ..:..:.. .... \-\> //; This should strip the timestamp and normalize the line for the other matches. -Mike