commit nagios-plugins-zypper for openSUSE:Factory
Hello community,
here is the log from the commit of package nagios-plugins-zypper for openSUSE:Factory
checked in at Mon Sep 28 17:53:49 CEST 2009.
--------
--- nagios-plugins-zypper/nagios-plugins-zypper.changes 2009-09-23 12:31:11.000000000 +0200
+++ nagios-plugins-zypper/nagios-plugins-zypper.changes 2009-09-28 16:51:38.000000000 +0200
@@ -1,0 +2,14 @@
+Mon Sep 28 16:51:03 CEST 2009 - lrupp@suse.de
+
+- update to 1.21:
+ + use --non-interactive everywhere
+
+-------------------------------------------------------------------
+Sat Sep 26 12:00:03 CEST 2009 - lrupp@suse.de
+
+- update to 1.2:
+ + use the same zypper options for all openSUSE versions > 11.0
+ (fixes bnc#538850)
+ + handle new message type 'warning'
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nagios-plugins-zypper.spec ++++++
--- /var/tmp/diff_new_pack.ZsdsAz/_old 2009-09-28 17:52:57.000000000 +0200
+++ /var/tmp/diff_new_pack.ZsdsAz/_new 2009-09-28 17:52:57.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package nagios-plugins-zypper (Version 1.1)
+# spec file for package nagios-plugins-zypper (Version 1.21)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,7 +20,7 @@
Name: nagios-plugins-zypper
Summary: Nagios plugin for checking software updates
-Version: 1.1
+Version: 1.21
Release: 1
Url: http://en.opensuse.org/Nagios-plugins-zypper
License: BSD 4-clause (or similar)
++++++ check_zypper.pl ++++++
--- /var/tmp/diff_new_pack.ZsdsAz/_old 2009-09-28 17:52:57.000000000 +0200
+++ /var/tmp/diff_new_pack.ZsdsAz/_new 2009-09-28 17:52:57.000000000 +0200
@@ -49,7 +49,7 @@
# constants
$PROGNAME="check_zypper";
-$VERSION="1.1";
+$VERSION="1.21";
$DEBUG = 0;
# variables
@@ -219,7 +219,7 @@
}
sub check_errorcode($){
- my $status=shift || "";
+ my $status=shift;
my $level=0;
my $returnvalue="OK";
$returnvalue="WARNING" if ("$opt_w" =~ /$status/);
@@ -230,12 +230,30 @@
return "$returnvalue";
}
+sub xml_re_escape($){
+ my ($text) = @_;
+ $text =~ s/&/&/sg;
+ $text =~ s/<//sg;
+ $text =~ s/"/"/sg;
+ $text =~ s/'/'/sg;
+ return $text;
+}
+
+sub trim($){
+ my ($text) = @_;
+ $text =~ s/^\s+//;
+ $text =~ s/\s+$//;
+ return $text;
+}
+
sub check(){
my ($status,$ret_str,$error);
my $secstr="";
my $recstr="";
my $optstr="";
my $pacstr="";
+ my $warnstr="";
my $update_avail=0;
my %packagelist;
print STDERR "INFO: Trying $use_sudo $zypper $zypperopt\n" if ($DEBUG);
@@ -245,17 +263,22 @@
my $category="unknown";
print STDERR "LINE: $_\n" if ($DEBUG);
# error handling
- return("UNKNOWN: $_","UNKNOWN") if (/not found on medium/);
- return("UNKNOWN: $_","UNKNOWN") if (/I\/O error: Can't provide/);
- return("UNKNOWN: $_","UNKNOWN") if (/Error message:/);
- return("UNKNOWN: $_","UNKNOWN") if (/A ZYpp transaction is already in progress./);
- return("UNKNOWN: $_","UNKNOWN") if (/System management is locked/);
+ return("UNKNOWN: ".xml_re_escape($_),"UNKNOWN") if (/not found on medium/);
+ return("UNKNOWN: ".xml_re_escape($_),"UNKNOWN") if (/I\/O error: Can't provide/);
+ return("UNKNOWN: ".xml_re_escape($_),"UNKNOWN") if (/Error message:/);
+ return("UNKNOWN: ".xml_re_escape($_),"UNKNOWN") if (/A ZYpp transaction is already in progress./);
+ return("UNKNOWN: ".xml_re_escape($_),"UNKNOWN") if (/System management is locked/);
if ((/out-of-date/)&&(!$opt_o)){
- $error="WARNING";
- $exitcode=1;
- $ret_str="WARNING: At least one of your Repositories is out of date. Please run \"zypper refresh\" as root to update it. ";
- $ret_str.="\n" if ($opt_v);
+ $error=check_errorcode("security");
+ $warnstr="At least one of your Repositories is out of date. Please run \"zypper refresh\" as root to update it. ";
+ $warnstr.="\n" if ($opt_v);
}
+ if (/
participants (1)
-
root@Hilbert.suse.de