Bug#419676: [Pkg-aide-maintainers] Bug#419676: aide's daily cron
script fails with etch when using NOISE
Marc Haber
mh+debian-packages at zugschlus.de
Tue Apr 17 12:21:03 UTC 2007
tags #419676 confirmed
thanks
On Tue, Apr 17, 2007 at 01:20:36PM +0200, Guillaume Lécroart wrote:
> Package: aide Version: 0.13.1
This is not a Debian version number. Please consider using the Debian
reportbug tool, which will collect correct version data of package and
dependencies.
> Aide's daily cron script fails with the following message :
>
> /etc/cron.daily/aide:
> /etc/cron.daily/aide: line 229: /tmp/aidenpcAqTF: cannot overwrite existing
> file
> run-parts: /etc/cron.daily/aide exited with return code 1
>
> line 229 contains a redirection to a file creataed at line 227 using the
> 'tempfile' utility. Script sets bash's '-G' flag preventing overwriting an
> existing file.
Confirmed. Looks like nobody (including me) was actually using the
denoise feature. Good catch.
Please try the following patch against the cronjob of aide 0.13.1-5.
--- /etc/cron.daily/aide.orig 2007-04-17 14:12:18.000000000 +0200
+++ /etc/cron.daily/aide 2007-04-17 14:13:55.000000000 +0200
@@ -277,14 +277,14 @@
if [ -n "${ARUNLOG:-}" ] && [ -s "$ARUNLOG" ]; then
if [ -n "${NOISE:-}" ]; then
- NOISETMP="$(tempfile --directory "/tmp" --prefix "aidenoise")"
- NOISETMP2="$(tempfile --directory "/tmp" --prefix "aidenoise")"
+ NOISETMP="$(mytempfile aidenoise1)"
+ NOISETMP2="$(mytempfile aidenoise2)"
< "$ARUNLOG" sed -n '1,/^Detailed information about changes:/p' | \
grep '^\(changed\|removed\|added\):' | \
- grep -v "^added: THERE WERE ALSO [0-9]\+ FILES ADDED UNDER THIS DIRECTORY" > "$NOISETMP2"
+ grep -v "^added: THERE WERE ALSO [0-9]\+ FILES ADDED UNDER THIS DIRECTORY" >> "$NOISETMP2"
if [ -n "$NOISE" ]; then
- < "$NOISETMP2" grep -v "^\(changed\|removed\|added\):$NOISE" > "$NOISETMP"
+ < "$NOISETMP2" grep -v "^\(changed\|removed\|added\):$NOISE" >> "$NOISETMP"
printf >> "$MAILFILE" "De-Noised output removes everything matching %s.\n" "$NOISE"
fi
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190
More information about the Pkg-aide-maintainers
mailing list