[debian-edu-commits] debian-edu/upstream/ 06/07: Reorder version matching in nagios-plugins/check_kernel_status to handle newer Linux kernels in Debian (Closes: #752374).

Petter Reinholdtsen pere at moszumanska.debian.org
Thu Aug 21 09:25:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository sitesummary.

commit 866047d0efd2ec3793bb1c2ec6a3d5fa5e0bcf72
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Aug 21 11:21:58 2014 +0200

    Reorder version matching in nagios-plugins/check_kernel_status to handle newer Linux kernels in Debian (Closes: #752374).
---
 debian/changelog                   |  2 ++
 nagios-plugins/check_kernel_status | 10 ++++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index cd5395a..8b57cb4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ sitesummary (0.1.11) UNRELEASED; urgency=low
   * Add Alexander Alemayhu as uploader.
   * Adjust nagios-plugins/check_kernel_status to avoid perl warning on
     Debian and Ubuntu.
+  * Reorder version matching in nagios-plugins/check_kernel_status to
+    handle newer Linux kernels in Debian (Closes: #752374).
 
  -- Petter Reinholdtsen <pere at debian.org>  Thu, 21 Aug 2014 10:21:24 +0200
 
diff --git a/nagios-plugins/check_kernel_status b/nagios-plugins/check_kernel_status
index cd2547e..102b428 100755
--- a/nagios-plugins/check_kernel_status
+++ b/nagios-plugins/check_kernel_status
@@ -37,14 +37,16 @@ elsif ( -e '/proc/version' )
 {
 	# Likely Debian
 	$sig = `cat /proc/version`;
-	if ( $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)\.dfsg\.(\d+)-(\d+)\)/
+	if (
+             # New format in kernel package version 3.2.32-1, match first to also work with
+             # kernel 3.13 and later in Debian.
+             $sig =~ / Debian (\d+)\.(\d+)\.(\d+)-(\d+)/
+
+             || $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)\.dfsg\.(\d+)-(\d+)\)/
 	     || $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)\.dfsg\.(\d+)-(\d+)\w+(\d+)\)/
 	     || $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)-(\d+).+?(\d+).+?(\d+)\)/
 	     || $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)-(\d+)lenny(\d+)\)/
 
-             # New format in kernel package version 3.2.32-1
-             || $sig =~ / Debian (\d+)\.(\d+)\.(\d+)-(\d+)/
-
 	   )
 	{
 		@running_version = ($1, $2, $3, $4, $5 || 0, $6 || 0);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/sitesummary.git



More information about the debian-edu-commits mailing list