Fwd: Patch for clamav-update

"Kirk Bauer" <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
---------- Forwarded message ----------
From: Penelope Fudd <[email protected]>
Date: Mon, 21 Jul 2008 09:51:06 -0700 (PDT)
Subject: Patch for clamav-update
To: [email protected]

Hi..

I enabled 'LogTime yes' in /etc/freshclam.conf, and logwatch start
reporting that no updates were occurring.  Here is a patch for
/usr/share/logwatch/scripts/services/clam-update.

--- clam-update.rpmsave	2008-07-21 09:46:23.000000000 -0700
+++ clam-update	2008-07-21 09:47:48.000000000 -0700
@@ -87,6 +87,9 @@
    # Freshclam ends log messages with a newline.  If using the LogSyslog
option, this is
    # turned into a space.  So we remove a space from every line, if it
exists.
    $ThisLine =~ s/ $//;
+   # Freshclam can have a date and time prepended to each line:
+   $ThisLine =~ s/^... ... .. ..:..:.. .... -> //;
+
    if (
        # separator of 38 dashes
        ($ThisLine =~ /^\-{38}$/) or




-- 
Kirk Bauer <[email protected]>
http://linux.kaybee.org | www.logwatch.org
Author, Automating UNIX & Linux Administration
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.