Re: Patch to avoid lowercasing logfile paths
"Kirk Bauer" <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
That was my fault. Early on I felt that case-insensitive config files are more user-friendly. I have long ago added support for double-quotes that can be used to protect values from being lower-cased. On 4/26/07, MrC <[email protected]> wrote: > Hi folks, > > Below is a patch to prevent lower-casing pathnames values for Logfile > variables in logwatch's config files. I've been bitten several times now > when I use paths such as: > > Logfile = /home/dir/Logs > > Logwatch lowercases the path to /home/dir/logs, and of course since that > path does not exist, logwatch happily ignores the nonexistent logfile, > exiting without a trace of info as to why no output was produced (even at > debug 10). > > It seems fundamentally wrong for logwatch to treat paths in a > case-insensitive manner, when the *nix file systems are case-sensitive. > > Does anyone disagree with this? > > --- logwatch.pl 2007-04-26 20:50:46.000000000 -0700 > +++ logwatch.pl.patched 2007-04-26 20:50:44.000000000 -0700 > @@ -255,7 +255,7 @@ > else { $value = ''; } > > push @ReadConfigNames, lc $name; > - push @ReadConfigValues, getInt $value; > + push @ReadConfigValues, $name =~ /^logfile$/i ? $value : getInt > $value; > if ($Config{'debug'} > 7) { > print "ReadConfigFile: Name=" . $name . ", Value=" . $value . > "\n"; > } > > > ----- > MrC > > _______________________________________________ > Logwatch-Devel mailing list > [email protected] > http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel > > -- Kirk Bauer <[email protected]> http://linux.kaybee.org | www.autorpm.org | www.logwatch.org