Fwd: Logwatch CVS patches

"Kirk Bauer" <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
---------- Forwarded message ----------
From: Craig Ruff <[email protected]>
Date: Nov 27, 2007 8:56 AM
Subject: Logwatch CVS patches
To: [email protected]


I found a couple of things while testing the CVS version (2007/11/27)
of logwatch.

The first (install-diff) fixes an issue using install_logwatch.sh
to install into a non-standard location where it failed to edit the
configuration directory path properly.

The second (getInt-undef-diff) prevents a perl complaint when getInt was
passed an undefined value for the 'hostlimit' config parameter.

--

Craig Ruff              NCAR                        [email protected]
303-497-1211            P.O. Box 3000
                        Boulder, CO  80307



-- 
Kirk Bauer <[email protected]>
http://linux.kaybee.org | www.logwatch.org
Author, Automating UNIX & Linux Administration

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
install-diff (text/plain, 573 B)
*** install_logwatch.sh.orig	2007-11-26 16:33:03.000000000 -0700
--- install_logwatch.sh	2007-11-26 16:32:25.000000000 -0700
***************
*** 168,174 ****
  install -m 0755 -d $CONFIGDIR/conf/html
  
  if [ $munge_conf ]; then
!    perl -pi -e "s%/etc/logwatch/conf%$CONFIGDIR/conf%" $BASEDIR/scripts/logwatch.pl
  fi
  
  touch $CONFIGDIR/conf/logwatch.conf
--- 168,174 ----
  install -m 0755 -d $CONFIGDIR/conf/html
  
  if [ $munge_conf ]; then
!    perl -pi -e "s%/etc/logwatch%$CONFIGDIR%" $BASEDIR/scripts/logwatch.pl
  fi
  
  touch $CONFIGDIR/conf/logwatch.conf
getInt-undef-diff (text/plain, 460 B)
*** scripts/logwatch.pl.orig	2007-11-27 08:48:30.000000000 -0700
--- scripts/logwatch.pl	2007-11-27 08:49:03.000000000 -0700
***************
*** 897,902 ****
--- 897,903 ----
  ######################################################################
  sub getInt {
     my $word = shift;
+    unless (defined($word)) { return $word; }
     my $tmpWord = lc $word;
     $tmpWord =~ s/\W//g;
     return $wordsToInts{$tmpWord} if (defined $wordsToInts{$tmpWord});
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.