[-]
[+]
|
Changed |
check_updates.changes
|
|
[-]
[+]
|
Changed |
check_updates.spec
^
|
|
[-]
[+]
|
Changed |
check_updates-1.6.0.tar.bz2/Changes
^
|
@@ -1,3 +1,7 @@
+2012-04-15 Matteo Corti <matteo.corti@id.ethz.ch>
+
+ * check_updates: added an option --security-only to ignore non-security related updates
+
2011-12-04 Matteo Corti <matteo.corti@id.ethz.ch>
* Version 1.5.2
@@ -191,7 +195,7 @@
* check_updates: recognizes CentOS
# File version information:
-# $Id: Changes 1281 2011-12-04 20:36:19Z corti $
-# $Revision: 1281 $
+# $Id: Changes 1296 2012-04-15 19:27:18Z corti $
+# $Revision: 1296 $
# $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/Changes $
-# $Date: 2011-12-04 21:36:19 +0100 (Sun, 04 Dec 2011) $
+# $Date: 2012-04-15 21:27:18 +0200 (Sun, 15 Apr 2012) $
|
[-]
[+]
|
Changed |
check_updates-1.6.0.tar.bz2/NEWS
^
|
@@ -1,3 +1,4 @@
+2012-04-15: 1.6.0 - added an option --security-only to ignore non-security related updates
2011-12-04: 1.5.2 - fixed a bug in system detection
2011-12-03: 1.5.1 - applied a patch to support Amazon Linux
2011-10-03: 1.5.0 - fixed a bug which caused -w and -c to be ignored
@@ -43,7 +44,7 @@
First stable release
2008-02-21: 0.9.9 - checks if the running kernel is the latest installed
-# $Id: NEWS 1281 2011-12-04 20:36:19Z corti $
-# $Revision: 1281 $
+# $Id: NEWS 1296 2012-04-15 19:27:18Z corti $
+# $Revision: 1296 $
# $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/NEWS $
-# $Date: 2011-12-04 21:36:19 +0100 (Sun, 04 Dec 2011) $
+# $Date: 2012-04-15 21:27:18 +0200 (Sun, 15 Apr 2012) $
|
[-]
[+]
|
Changed |
check_updates-1.6.0.tar.bz2/check_updates
^
|
@@ -28,7 +28,7 @@
use strict;
use warnings;
-our $VERSION = '1.5.2';
+our $VERSION = '1.6.0';
use Carp;
use English qw(-no_match_vars);
@@ -388,6 +388,7 @@
# Throws : n/a
# Comments : n/a
# See also : n/a
+## no critic (ProhibitExcessComplexity)
sub check_yum {
my $message;
@@ -405,6 +406,11 @@
if ( !$security_plugin ) {
+ if ( $options->get('security-only') ) {
+ verbose
+"up2date does not distinguish security updates ignoring --security-only option\n";
+ }
+
# every update is critical since it could be a security problem
$status = CRITICAL;
@@ -428,6 +434,12 @@
$status = CRITICAL;
}
+ if ( $options->get('security-only') ) {
+
+ # ignore any other update
+ $status = OK;
+ }
+
@security_updates = run_yum('--security');
if ( @security_updates > 0 ) {
@@ -506,6 +518,7 @@
return;
}
+## use critic (ProhibitExcessComplexity)
##############################################################################
# Usage : check_up2date();
@@ -722,17 +735,22 @@
$options->arg(
spec => 'warning|w=i',
help =>
- 'Exit with WARNING status if more than INTEGER updates are available',
+'Exit with WARNING status if more than INTEGER non-security updates are available',
default => 0
);
$options->arg(
spec => 'critical|c=i',
help =>
-'Exit with CRITICAL status if more than INTEGER updates are available',
+'Exit with CRITICAL status if more than INTEGER non-security updates are available',
default => 0
);
+ $options->arg(
+ spec => 'security-only',
+ help => 'Ignores non-security updates',
+ );
+
$options->getopts();
###############
@@ -784,6 +802,12 @@
}
elsif ( $updater eq 'up2date' ) {
verbose "Using up2date\n";
+
+ if ( $options->get('security-only') ) {
+ verbose
+"up2date does not distinguish security updates ignoring --security-only option\n";
+ }
+
check_running_kernel();
check_up2date();
}
|
[-]
[+]
|
Changed |
check_updates-1.6.0.tar.bz2/check_updates.pod
^
|
@@ -1,9 +1,9 @@
################################################################################
# File version information:
-# $Id: check_updates.pod 1281 2011-12-04 20:36:19Z corti $
-# $Revision: 1281 $
+# $Id: check_updates.pod 1296 2012-04-15 19:27:18Z corti $
+# $Revision: 1296 $
# $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/check_updates.pod $
-# $Date: 2011-12-04 21:36:19 +0100 (Sun, 04 Dec 2011) $
+# $Date: 2012-04-15 21:27:18 +0200 (Sun, 15 Apr 2012) $
################################################################################
=pod
@@ -20,7 +20,7 @@
=head1 VERSION
-Version 1.5.2
+Version 1.6.0
=head1 SYNOPSIS
@@ -42,6 +42,8 @@
Exit with WARNING status if more than INTEGER updates are available
-c, --critical=INTEGER
Exit with CRITICAL status if more than INTEGER updates are available
+ --security-only
+ Ignores non-security updates
-t, --timeout=INTEGER
Seconds before plugin times out (default: 15)
-v, --verbose
@@ -61,9 +63,11 @@
--no-boot-check do not complain if the machine was booted with an old kernel
- -w, --warning=INTEGER Exit with WARNING status if more than INTEGER updates are available
+ -w, --warning=INTEGER Exit with WARNING status if more than INTEGER non-security updates are available
- -c, --critical=INTEGER Exit with CRITICAL status if more than INTEGER updates are available
+ -c, --critical=INTEGER Exit with CRITICAL status if more than INTEGER non-security updates are available
+
+ --security-only Ignores non-security updates
-t, --timeout=INTEGER Seconds before plugin times out (default: 15)
@@ -71,9 +75,13 @@
Security updates always force a CRITICAL state
+=head1 SECURITY UPDATES
+
+If yum's security plugin is available
+
=head1 EXAMPLE
- check_updates
+check_updates
check_updates checks if the system is up-to-date
|
[-]
[+]
|
Changed |
check_updates-1.6.0.tar.bz2/check_updates.spec
^
|
@@ -1,12 +1,12 @@
################################################################################
# File version information:
-# $Id: check_updates.spec 1281 2011-12-04 20:36:19Z corti $
-# $Revision: 1281 $
+# $Id: check_updates.spec 1297 2012-04-15 19:43:35Z corti $
+# $Revision: 1297 $
# $HeadURL: https://svn.id.ethz.ch/nagios_plugins/check_updates/check_updates.spec $
-# $Date: 2011-12-04 21:36:19 +0100 (Sun, 04 Dec 2011) $
+# $Date: 2012-04-15 21:43:35 +0200 (Sun, 15 Apr 2012) $
################################################################################
-%define version 1.5.2
+%define version 1.6.0
%define release 0
%define sourcename check_updates
%define packagename nagios-plugins-check-updates
@@ -73,6 +73,9 @@
%{_mandir}/man1/%{sourcename}.1*
%changelog
+* Sun Apr 15 2012 Matteo Corti <matteo.corti@id.ethz.ch> - 1.6.0-0
+- Updated to 1.6.0 (--security-only option)
+
* Sun Dec 4 2011 Matteo Corti <matteo.corti@id.ethz.ch> - 1.5.2-0
- Updated to 1.5.2 (bug fix release)
|