Bug 184102 - logwatch script for cron fails when hostname contains hyphen
logwatch script for cron fails when hostname contains hyphen
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: logwatch (Show other bugs)
noarch Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
Depends On:
Blocks: 187539
  Show dependency treegraph
Reported: 2006-03-06 05:25 EST by Fred New
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2006-0333
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-10 17:43:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Fred New 2006-03-06 05:25:30 EST
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):

How reproducible:

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

---    } 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 17:43:17 EDT
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.


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