[Logcheck-devel] Bug#279635: logcheck: empty line in `local' file is copied to egrep pattern file
Jim Meyering
meyering at pi.meyering.net
Thu Nov 4 09:45:07 UTC 2004
Package: logcheck
Version: 1.2.30
Severity: important
With the installation of logcheck-1.2.30, I started getting hundreds
of lines of messages every hour. The problem was that
I had a blank line in violations.d/local.
Of course, I shouldn't have had a blank line in the file
in the first place.
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
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.9jmm
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages logcheck depends on:
ii adduser 3.59 Add and remove users and groups
ii cron 3.0pl1-86 management of regular background p
ii debconf [debconf 1.4.39 Debian configuration management sy
ii debianutils 2.10.3 Miscellaneous utilities specific t
ii lockfile-progs 0.1.10 Programs for locking and unlocking
ii logcheck-databas 1.2.30 A database of system log rules for
ii logtail 1.2.30 Print log file lines that have not
ii mailx 1:8.1.2-0.20040524cvs-1 A simple mail user agent
ii perl 5.8.4-3 Larry Wall's Practical Extraction
ii postfix [mail-tr 2.1.5-1 A high-performance mail transport
ii sysklogd [system 1.4.1-15 System Logging Daemon
-- debconf information:
logcheck/security_level: workstation
logcheck/manage_conffiles: true
logcheck/upgrade-note:
* logcheck/noroot:
* logcheck/changes:
* logcheck/install-note:
logcheck/email_address: root
logcheck/rewrite-note:
More information about the Logcheck-devel
mailing list