Bug 184102 - logwatch script for cron fails when hostname contains hyphen
Summary: logwatch script for cron fails when hostname contains hyphen
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: logwatch
Version: 3.0
Hardware: noarch
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 187539
TreeView+ depends on / blocked
 
Reported: 2006-03-06 10:25 UTC by Fred New
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHBA-2006-0333
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-10 21:43:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0333 0 normal SHIPPED_LIVE logwatch bug fix update 2006-07-19 19:20:00 UTC

Description Fred New 2006-03-06 10:25:30 UTC
Description of problem:
The logwatch script for cron doesn't run if the hostname contains a hyphen.

Version-Release number of selected component (if applicable):
logwatch-4.3.2-2.noarch.rpm

How reproducible:
always

Steps to Reproduce:
1. Put a hyphen in the hostname
2. Run logwatch
  
Actual results:
If I am expecting a cron section in the LogWatch email message, this section
doesn't appear.

Expected results:
I should get a cron section in LogWatch if I am expecting one.

Additional info:

We were able to work around this bug by patching
/etc/log.d/scripts/logfiles/cron/applydate:

46c46
---    } elsif ($ThisLine =~ m/^$SearchDate2 ..:..:.. \w+ \w+\[\d+\]:/o) {
+++    } elsif ($ThisLine =~ m/^$SearchDate2 ..:..:.. [a-zA-Z0-9.\-_]+
\w+\[\d+\]:/o) {

But I notice that this line is different (probably fixed) for
logwatch-5.2.2-1.EL4.1 on RHEL4 (line 60):
+++   } elsif ($ThisLine =~ m/^$SearchDate2 ..:..:.. [^ ]+ \w+\[\d+\]:/o) {

Comment 3 Red Hat Bugzilla 2006-05-10 21:43:17 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0333.html



Note You need to log in before you can comment on or make changes to this bug.