[Logcheck-devel] Bug#295560: logcheck: Broken patch?

Moritz Naumann bugs.debian.org at moritz-naumann.com
Sat Sep 23 08:38:22 UTC 2006


Package: logcheck
Version: 1.2.47
Followup-For: Bug #295560

This patch does not work for me in 1.2.47.

Here's a (quick and dirty) way to determine the line number of a broken
regular expression in a logcheck rule file. It doesn't solve the problem
of not so useful output on cron jobs, though.

#!/bin/bash
#
# Quick and dirty script to determine the line number of a broken
# regular expression in a logcheck ignore rule file.
#
#FILETOEXAMINE=/etc/logcheck/ignore.d.server/kernel
FILETOEXAMINE=$1
ALLLINES=`grep -c '^' $FILETOEXAMINE`

for ((LINENUMBER=1; LINENUMBER<=ALLLINES; LINENUMBER++))
do
  GREPRESULT=`head -n $LINENUMBER $FILETOEXAMINE | tail -n 1 | egrep -f
- 2>&1`
  if [ "x$GREPRESULT" != "x" ]; then
    echo "$LINENUMBER:  $GREPRESULT"
  fi
done



-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=de_DE.utf-8, LC_CTYPE=de_DE.utf-8 (charmap=UTF-8)

Versions of packages logcheck depends on:
ii  adduser          3.97                    Add and remove users and groups
ii  cron             3.0pl1-97               management of regular background p
ii  debconf [debconf 1.5.4                   Debian configuration management sy
ii  grep             2.5.1.ds2-5             GNU grep, egrep and fgrep
ii  lockfile-progs   0.1.10                  Programs for locking and unlocking
ii  logtail          1.2.47                  Print log file lines that have not
ii  mailx            1:8.1.2-0.20050715cvs-1 A simple mail user agent
ii  nullmailer [mail 1:1.03-2.1              simple relay-only mail transport a
ii  sysklogd [system 1.4.1-18                System Logging Daemon

Versions of packages logcheck recommends:
ii  logcheck-database             1.2.47     database of system log rules for t

-- debconf information:
  logcheck/changes:
* logcheck/install-note:





More information about the Logcheck-devel mailing list