Fwd: preserve hostname patch

"Kirk Bauer" <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
------------------------------------------------------
Kirk Bauer <[email protected]>
http://linux.kaybee.org | www.logwatch.org
Author, Automating UNIX & Linux Administration


---------- Forwarded message ----------
From: Nathan Crawford <[email protected]>
Date: Thu, Oct 30, 2008 at 7:43 PM
Subject: preserve hostname patch
To: [email protected]


Hi - Here's a small patch for logwatch.pl that preserves the hostname
from being replaced with values from the wordsToInts array. The need
for this arose on a server called 'medium', which was being replaced
with '5'.

- Nathan

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
preserve-hostname.patch (text/x-diff, 416 B)
--- logwatch.pl	2008-05-08 21:05:29.000000000 -0400
+++ logwatch.pl.change	2008-10-30 22:29:43.000000000 -0400
@@ -937,7 +937,9 @@
 ######################################################################
 sub CleanVars {
    foreach (keys %Config) {
-      $Config{$_} = getInt($Config{$_});
+      unless (defined $Config{$_} and $_ eq "hostname") {
+         $Config{$_} = getInt($Config{$_});
+      }
    }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.