From a2b26cd59445751771f2079c0a5823d8e1045a2e Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 23 Sep 2010 07:32:42 +0000 Subject: [PATCH 1/2] fix raid01 and linear --- debian/changelog | 13 +++-- debian/patches/00list | 1 + .../05_check_linux_raid_fix_striped.dpatch | 47 +++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100755 debian/patches/05_check_linux_raid_fix_striped.dpatch diff --git a/debian/changelog b/debian/changelog index 5662c8d..b2f1ea1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,15 @@ -nagios-plugins (1.4.15-2) UNRELEASED; urgency=low +nagios-plugins (1.4.15-2) unstable; urgency=low [ Alexander Wirt ] - * Call ps with two "w" to ensure unlimited width of ps output - (Closes: #596372) + * Call ps with two "w" to ensure unlimited width of ps output + (Closes: #596372) - -- Alexander Wirt Fri, 10 Sep 2010 22:24:01 +0200 + [ Jan Wagner ] + * Add 05_check_linux_raid_fix_striped.dpatch to fix bad output from + check_linux_raid with RAID0 and linear volumes, thanks to Thomas + Guyot-Sionnest (Closes: #579049) - LP: #621380 + + -- Jan Wagner Thu, 23 Sep 2010 09:24:39 +0200 nagios-plugins (1.4.15-1) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index 07a626d..379211d 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,3 +1,4 @@ 01_subst.in.dpatch 02_check_icmp_links.dpatch +05_check_linux_raid_fix_striped.dpatch # commited upstream diff --git a/debian/patches/05_check_linux_raid_fix_striped.dpatch b/debian/patches/05_check_linux_raid_fix_striped.dpatch new file mode 100755 index 0000000..d82363a --- /dev/null +++ b/debian/patches/05_check_linux_raid_fix_striped.dpatch @@ -0,0 +1,47 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05_check_linux_raid_fix_striped.dpatch by Thomas Guyot-Sionnest +## +## DP: Fix RAID0 and linear volumes (http://bugs.debian.org/579049) +## DP: Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/621380 +## DP: Upstream bug is: http://sourceforge.net/tracker/?func=detail&aid=3049988&group_id=29880&atid=397597 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.15~/contrib/check_linux_raid.pl nagios-plugins-1.4.15/contrib/check_linux_raid.pl +--- nagios-plugins-1.4.15~/contrib/check_linux_raid.pl 2010-07-27 22:47:15.000000000 +0200 ++++ nagios-plugins-1.4.15/contrib/check_linux_raid.pl 2010-09-23 09:00:11.000000000 +0200 +@@ -71,7 +71,8 @@ + } elsif (/^($nextdev)\s*:/) { + $device=$1; + $devices{$device}=$device; +- if (/active/) { ++ if (/\sactive/) { ++ $status{$device} = ''; # Shall be filled later if available + $active{$device} = 1; + } + } +@@ -80,7 +81,11 @@ + } + + foreach my $k (sort keys %devices){ +- if ($status{$k} =~ /_/) { ++ if (!exists($status{$k})) { ++ $msg .= sprintf " %s inactive with no status information.", ++ $devices{$k}; ++ $code = max_state($code, "CRITICAL"); ++ } elsif ($status{$k} =~ /_/) { + if (defined $recovery{$k}) { + $msg .= sprintf " %s status=%s, recovery=%s, finish=%s.", + $devices{$k}, $status{$k}, $recovery{$k}, $finish{$k}; +@@ -94,10 +99,11 @@ + $code = max_state($code, "OK"); + } else { + if ($active{$k}) { +- $msg .= sprintf " %s active with no status information.\n", ++ $msg .= sprintf " %s active with no status information.", + $devices{$k}; + $code = max_state($code, "OK"); + } else { ++ # This should't run anymore, but is left as a catch-all + $msg .= sprintf " %s does not exist.\n", $devices{$k}; + $code = max_state($code, "CRITICAL"); + } From 0e9b47de4cc5bd58cf2a7db75945f416c873950c Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Thu, 23 Sep 2010 08:21:09 +0000 Subject: [PATCH 2/2] bump standards --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b2f1ea1..947f73f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ nagios-plugins (1.4.15-2) unstable; urgency=low * Add 05_check_linux_raid_fix_striped.dpatch to fix bad output from check_linux_raid with RAID0 and linear volumes, thanks to Thomas Guyot-Sionnest (Closes: #579049) - LP: #621380 + * Bump Standards-Version to 3.9.1, no changes needed -- Jan Wagner Thu, 23 Sep 2010 09:24:39 +0200 diff --git a/debian/control b/debian/control index b1c4f17..69d873f 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9), autotools-dev, libldap2-dev, Homepage: http://nagiosplug.sourceforge.net Vcs-Browser: http://svn.debian.org/wsvn/pkg-nagios/nagios-plugins/ Vcs-Svn: svn://svn.debian.org/pkg-nagios/nagios-plugins/trunk/ -Standards-Version: 3.8.4 +Standards-Version: 3.9.1 Package: nagios-plugins Architecture: all