[Yum] Yum scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all,

Thanks for all your help. Bryan's script worked a treat ! Here it is again 
for anyone else :

#!/usr/bin/perl
#

$value = system "yum check-update";

if($value == 100) {
          print "YUM UPDATES AVAILABLE - $value\n";
          exit(2);
} else {
          print "YUM OKAY - NO UPDATES AVAILABLE - $value\n";
          exit(O);
}

Bryan




Matthew
------------------------------------------------------------------------------
Matthew Quinney
Holland & Holland Ltd.
31-33 Bruton Street
London
W1J 6HH

Tel - 0207 4994411
Fax - 0207 4087960
eMail - matthew.quinney@xxxxxxxxxxxxxxxxxxxxx




seth vidal <skvidal@xxxxxxxxxxxx> 
Sent by: yum-bounces@xxxxxxxxxxxxxxxxxxxx
24/09/2003 14:06
Please respond to
"Yellowdog Updater, Modified" <yum@xxxxxxxxxxxxxxxxxxxx>


To
"Yellowdog Updater, Modified" <yum@xxxxxxxxxxxxxxxxxxxx>
cc

Subject
Re: [Yum] Yum scripts






On Wed, 2003-09-24 at 09:05, Matthew.Quinney@xxxxxxxxxxxxxxxxxxxxx
wrote:
> Seth,
> 
> I am running simply yum check-update, but nothing is returned to
> Nagios at all. Nagios simply reports 'No output!'.
> 
> From running the command at the command line, should I expect to see a
> 0 returned ? 
> 

No - nothing is outputted on stdout - it's return code to the shell is 0

try this:

yum check-update; echo $?

-sv


_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum

_____________________________________________________________________
This e-mail has been scanned for viruses by the uuNet Internet Managed 
Scanning Service - powered by MessageLabs.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dulug.duke.edu/pipermail/yum/attachments/20030926/4b8bf7e8/attachment.htm

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux