Bug#279635: [Logcheck-devel] Bug#279635: logcheck: empty line in `local' file is copied to egrep pattern file
Gerfried Fuchs
alfie at ist.org
Fri Nov 5 11:11:34 UTC 2004
* Gerfried Fuchs <alfie at ist.org> [2004-11-05 11:32]:
>>> Here's a patch that fixed it:
>>>
>>> --- /usr/sbin/logcheck.~5~ 2004-11-04 10:04:55.000000000 +0100
>>> +++ /usr/sbin/logcheck 2004-11-04 10:30:21.000000000 +0100
>>> @@ -615,7 +615,7 @@
>>> mkdir $TMPDIR/logoutput \
>>> || error "Could not mkdir for log files"
>>> if [ ! $LOGFILE ]; then
>>> - for file in $(egrep --text -v "(^#|^[[:space:]]\+$)" $LOGFILES_LIST); do
>>> + for file in $(egrep --text -v "(^#|^[[:space:]]*$)" $LOGFILES_LIST); do
>>> logoutput "$file"
>>> done
>>> elif [ $LOGFILE ]; then
>>
>> I am confused. Doesn't line 618 just parse the list of logfiles to be
>> processed? How could this cause a blank line in violations.d/local to be a
>> problem?
>
> Your last question is interesting.
Line 191 is the culprit, changing it back. Though:
egrep --text -v '^[[:space:]]*$|^#' $dir/$rulefile ....
In above we have "(^#|^[[:space:]]*$)". Is there a reason for the ()
in above? (answers to this though might be better redirected to
logcheck-devel at alioth.debian.org directly)
So long,
Alfie
--
Subject: test From: "Bastian Hendriksen" <soran1974 at nexgo.de>
Newsgroups: de.alt.sysadmin.recovery
just testing, ignore this! MID:<vji05a.2m2.ln at videal.mod.local>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20041105/57dd8a93/attachment.pgp
More information about the Logcheck-devel
mailing list