[Yum] Yum scripts
Matthew.Quinney at hollandandholland.com
Matthew.Quinney at hollandandholland.com
Wed Sep 24 13:37:51 UTC 2003
Seth,
Thanks, your debug worked and I got the correct error. I am trying to work
out how to add this to a shellscript so that I can send back formatted
errors to Nagios. Can you help me with my Perl code, I am a bit of a
novice ? Here is my program....
#!/usr/bin/perl
#
open( YUMGET, "yum check-update; echo $? |");
$value = <YUMGET>;
close (YUMGET);
if($value =~ /100/) {
print "YUM UPDATES AVAILABLE - $value\n";
exit(2);
} else {
print "YUM OKAY - NO UPDATES AVAILABLE - $value\n";
exit(O);
}
The program runs okay, but for some reason I only get the first line
returned -
YUM OKAY - NO UPDATES AVAILABLE - Gathering header information file(s)
from server(s)
Can you help at all ?
Thanks
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.baseurl.org/pipermail/yum/attachments/20030924/5e61ba40/attachment-0001.htm
More information about the Yum
mailing list