[Logcheck-devel] Re: [Logcheck-commits] CVS logcheck/src

maks attems debian at sternwelten.at
Sat May 15 13:32:38 UTC 2004


hey todd,

looked again at that return value check merge:

@@ -557,7 +584,8 @@
# the same lines) and reduce CPU and memory usage afterwards.
debug "Sorting logs"
$SORT -m $TMPDIR/logoutput/* | uniq | sed -e 's/ *$//' \
-    > $TMPDIR/logoutput-sorted
+    > $TMPDIR/logoutput-sorted \
+    ||error "Could not output to $TMPDIR/logoutput-sorted Disk Full?"

i guess that aboves introduces some wrong message, 
because that it can potenitally fail if the files in $TMPDIR/logoutput/* 
contains nothing.

maybe it should be checked before as of aboves dir contains data,
as we check afterwards if $TMPDIR/logoutput-sorted contains data
like:

for file in $TMPDIR/logoutput/*; do
    if [ -s $file ]; then
	$SORT $TMPDIR/logoutput/* | uniq | sed -e 's/ *$//' \
	    > $TMPDIR/logoutput-sorted \
	    || error "Could not output $file to $TMPDIR/logoutput-sorted Disk Full?"
    fi
done

(well the -m option should go to the other options.)

a++ maks
-------------- 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/20040515/1fb0e921/attachment.pgp 


More information about the Logcheck-devel mailing list