[Nagiosplug-devel] New plugin: check_yum

Sean Dilda agrajag at dragaera.net
Wed Apr 21 10:18:02 CEST 2004


On Wed, 2004-04-21 at 11:21, Gerwin Krist -|- Digitalus.NL wrote:
> Thanks for the tip, I changed it right away. I had some problems for
> getting the error codes within bash (i normally don't use bash scripts
> for my scripting needs). But now it's completely based on the exit codes
> from yum.

Just looked at the new version.  It looks good.  Although I still have a
few small suggestions I'd like to make :)

First is you seem to have a carriage return before your '#!/bin/sh' 
That'll work in most cases, but is technically wrong and will cause
problems in a few instances.

For the return codes, I'd suggest removing the check for $returncode =
1.  Then, after after the check for $returncode = 0, have it give the
error for yum related problem, without checking the returncode.  Just
assume anything other than 0 or 100 is a yum problem.  Right now if yum
gives any other exit code, your plugin will exit normally with a return
code of 0, which is kinda bad.





More information about the Devel mailing list