[Logwatch-Devel] Fwd: Patch for clamav-update

Kirk Bauer kirk at kaybee.org
Mon Jul 21 10:19:34 MST 2008


---------- Forwarded message ----------
From: Penelope Fudd <kernel at pkts.ca>
Date: Mon, 21 Jul 2008 09:51:06 -0700 (PDT)
Subject: Patch for clamav-update
To: logwatch-patches at logwatch.org

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 <kirk at kaybee.org>
http://linux.kaybee.org | www.logwatch.org
Author, Automating UNIX & Linux Administration


More information about the Logwatch-Devel mailing list