Casper Gielen
2011-Mar-02 14:45 UTC
[Logcheck-devel] Bug#616103: logcheck: (re)enable globbing of logfile names
Package: logcheck Version: 1.3.13 Severity: minor Tags: patch In Lenny it was possible to use wildcards in logcheck.logfiles. For example, I used: /var/log/HOSTS/*/*.log root at durer:~# su -s /bin/bash -c "bash -x /usr/sbin/logcheck" logcheck <cut> + read file + logoutput '/var/log/HOSTS/*/*.log' + file='/var/log/HOSTS/*/*.log' + debug 'logoutput called with file: /var/log/HOSTS/*/*.log' + '[' 0 -eq 1 ']' + '[' -f '/var/log/HOSTS/*/*.log' ']' + echo 'E: File could not be read: /var/log/HOSTS/*/*.log' <cut> The wildcards in the path are not expanded. I've attached a patch that does so. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores) Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to nl_NL.UTF-8) Shell: /bin/sh linked to /bin/bash -------------- next part -------------- --- logcheck 2010-09-03 10:25:15.000000000 +0200 +++ /usr/sbin/logcheck 2011-03-02 15:39:49.097878736 +0100 @@ -436,6 +436,12 @@ fi } +# Expand wildcards +# eg: /dev/n*ll -> /dev/null +glob() { + xargs -i ls {} +} + # Show all the cli options to our users. usage() { debug "usage: Printing usage and exiting" @@ -658,7 +664,7 @@ mkdir "$TMPDIR/logoutput" \ || error "Could not mkdir for log files" if [ ! "$LOGFILE" ] && [ -r "$LOGFILES_LIST" ]; then - egrep --text -v "(^#|^[[:space:]]*$)" "$LOGFILES_LIST" | while read file; do + egrep --text -v "(^#|^[[:space:]]*$)" "$LOGFILES_LIST" | glob | while read file; do logoutput "$file" done elif [ "$LOGFILE" ]; then
Debian Bug Tracking System
2011-Sep-08 14:51 UTC
[Logcheck-devel] Bug#616103: marked as done (logcheck: (re)enable globbing of logfile names)
Your message dated Thu, 08 Sep 2011 14:48:49 +0000 with message-id <E1R1fuL-0008RV-Ue at franck.debian.org> and subject line Bug#616103: fixed in logcheck 1.3.14 has caused the Debian Bug report #616103, regarding logcheck: (re)enable globbing of logfile names to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 616103: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616103 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Casper Gielen <C.Gielen at uvt.nl> Subject: logcheck: (re)enable globbing of logfile names Date: Wed, 02 Mar 2011 15:45:41 +0100 Size: 4310 URL: <http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20110908/dbbb5722/attachment-0002.mht> -------------- next part -------------- An embedded message was scrubbed... From: Hannes von Haugwitz <hannes at vonhaugwitz.com> Subject: Bug#616103: fixed in logcheck 1.3.14 Date: Thu, 08 Sep 2011 14:48:49 +0000 Size: 10038 URL: <http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20110908/dbbb5722/attachment-0003.mht>
Apparently Analagous Threads
- Bug#612403: xen-utils-common: Explain that this package is only needed on the host
- Bug#616103: (re)enable globbing of logfile names
- Bug#745419: xen-utils-4.1: Pygrub fails to boot from LVM LV when something installed in the volume boot record
- Bug#608256: /etc/logcheck/ignore.d.server/dnsmasq: dnsmasq: interface names are allowed to have a dash (-) please add this to the filter
- Re: [Logcheck-commits] CVS logcheck/src