logwatch fails if "dash" in hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
In case anyone else is having this problem, I have just submitted a bug/patch 
to bugzilla to fix a problem with logwatch. My ISP recently changed the 
hostname format to one that added dashes to the name. This caused logwatch 
to start reporting Unmatched Errors for the cron service report. The problem 
was that it looks for a host string that is letters & numbers, but does not 
include dashes. 

Here are the 2 lines (old is commented out) near top of file:
(lines may appear wraped in email)
file  is /etc/log.d/scripts/services/cron

#  if (($ThisLine =~ s/^([^ ]+) \([^ ]+\)\s+//) or ($ThisLine =~ s/^... .. ..:..:.. \w+ \w+\[\d+\]: \((\S+)\)\s+//)) {
    if (($ThisLine =~ s/^([^ ]+) \([^ ]+\)\s+//) or ($ThisLine =~ s/^... .. ..:..:.. [-\w]+ \w+\[\d+\]: \((\S+)\)\s+//)) {

-- 
Pete Nesbitt, rhce


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux