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

Todd Troxell ttroxell at debian.org
Wed May 19 08:15:19 UTC 2004


On Mon, May 17, 2004 at 06:52:51PM +0200, maks attems wrote:
> I think you were right, that we need to check _all_
> return values.
> 
> we can therefor reduce the probability of a failing grep
> and the disc may already be very full if cat header fails.

enabled!

> oooh i found i nice pointer at the manpage of grep(1):
> DIAGNOSTICS
> 	Normally, exit status is 0 if selected lines are found and 1 otherwise.
> 	But the exit status is 2 if an error occurred, unless the -q or --quiet
> 	or --silent option is used and a selected line is found.
> 
> so todd please reanable your check for footer,
> and add a check for egreps of exit status 2! 

The problem is, we get the same exit status when grep either:
	-cannot append to the file
	-does not find any matches

(It's 1 both times)  The problem is that the error is not a grep error and
comes from the shell (>>), so grep doesn't know.

...or did I misunderstand?

I know of ways to do this, but they are not pretty :\

-- 
[   Todd J. Troxell                                         ,''`.
      Student, Debian GNU/Linux Developer, SysAdmin, Geek  : :' :
      http://debian.org || http://rapidpacket.com/~xtat    `. `' 
                                                             `-     ]
-------------- 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/20040519/a9298185/attachment.pgp 


More information about the Logcheck-devel mailing list