Bug 133940 - logwatch automount script does not work
logwatch automount script does not work
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: logwatch (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
RHEL3U7NAK
:
Depends On:
Blocks: 187539
  Show dependency treegraph
 
Reported: 2004-09-28 11:49 EDT by Matthew Galgoci
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

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


Attachments (Terms of Use)
patch for logwatch automount script in RHEL3-WS (696 bytes, patch)
2005-02-08 19:36 EST, Eskil Brun
no flags Details | Diff
Proposed patch. (1.51 KB, patch)
2005-09-05 10:12 EDT, Ivana Varekova
no flags Details | Diff

  None (edit)
Description Matthew Galgoci 2004-09-28 11:49:43 EDT
Description of problem:

/etc/log.d/scripts/services/automount has issues. During log
processing I get the following errors:


Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 2.
Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 2.
Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 5.
Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 8.
Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 11.
Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 14.
Use of uninitialized value in hash element at
/etc/log.d/scripts/services/automount line 28, <STDIN> line 17.


Version-Release number of selected component (if applicable):

logwatch-4.3.2-2


How reproducible:

Every time,

Steps to Reproduce:
1. Run logwatch on system logs that contain autofs log messages.
  
Actual results:


Expected results:

autofs parsing script should run with no errors and produce meaningful
reports about autofs activity.

This first appeared in RHEL3U3 and at no time before.
Comment 1 Chris Evich 2004-10-14 15:24:28 EDT
I am also noticing this problem both at work and home.  RHEL ES on both.
Comment 2 William Hooper 2004-11-18 12:09:58 EST
Upstream issue.

See thread at:
http://www2.list.logwatch.org:81/pipermail/logwatch-devel/2004-July/000584.html

Bug 126558 says it is fixed sometime after logwatch-5.1-4...
Comment 3 Eskil Brun 2005-02-08 19:32:01 EST
We have also noticed this on our RHEL3-WS computers.
Very annoying getting mail from hundreds of computers with buggy
output from the automount logwatch script.

The following patch fixes the problem:

--- automount.orig      2005-02-09 00:48:36.000000000 +0100
+++ automount   2005-02-09 00:52:56.000000000 +0100
@@ -16,9 +16,14 @@
 while (defined($ThisLine = <STDIN>)) {
    if ( ($ThisLine =~ /^using kernel protocol version .*$/) or
          ($ThisLine =~ /^expired .*$/) or
-         ($ThisLine =~ /^>> mount: .*$/) ) {
+         ($ThisLine =~ /^failed to mount (.*)$/) ) {
       # don't care about these
    }
+   elsif ( ($ThisMount) = ( $ThisLine =~ /^>> mount: .*:(.*) failed,
.*$/)) {
+      # store Mount
+      $Mount= $ThisMount;
+      $MountAttempts++;
+   }
    elsif ( ($ThisMount) = ($ThisLine =~ /^attempting to mount entry
(.*)$/) ) {
       # store Mount
       $Mount= $ThisMount;
Comment 4 Eskil Brun 2005-02-08 19:36:50 EST
Created attachment 110839 [details]
patch for logwatch automount script in RHEL3-WS

Oh. The patch seems to have been line-broken. Attaching it as a file.
Comment 5 Ivana Varekova 2005-09-05 10:12:11 EDT
Created attachment 118472 [details]
Proposed patch.

Hello, 
attached patch should fix this problem (it solves problem more generally than
previous patch - it is upstream resolution). 
Could you please test this patch? If there is any problem please attach your
/var/log/message file.
Comment 15 Red Hat Bugzilla 2006-05-10 17:42:08 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.

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.