[nagiosplug] Fix Debian bug #534604: Checking md10 and above

"Holger Weiss" <[email protected]>
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
 Module: nagiosplug
 Branch: master
 Commit: 933918ce5dd0c0f162e5d4acc0f1cfdc9c7a1631
 Author: Holger Weiss <[email protected]>
   Date: Mon Apr 12 15:49:24 2010 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=933918c

Fix Debian bug #534604: Checking md10 and above

| check_linux_raid malfunctions if system has software RAID devices with
| two or more digits.  For example, for system having /dev/md10,
| /dev/md11 etc, the plugin returns 'UNKNOWN' in automatic mode (if RAID
| devices are manually specified it works).  Also, if system has both
| one-digit, and two-digit RAID devices, the two-digit devices are
| silently ignored in checks, which is even more problematic.

[ http://bugs.debian.org/534604 ]

(Fixed by Matija Nalis, forwarded by Jan Wagner.)

---

 contrib/check_linux_raid.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl
index da1aff8..c7c9c55 100644
--- a/contrib/check_linux_raid.pl
+++ b/contrib/check_linux_raid.pl
@@ -44,7 +44,7 @@ sub max_state($$){
 
 my $nextdev;
 if(defined $ARGV[0]) { $nextdev = shift; }
-else { $nextdev = "md[0-9]"; }
+else { $nextdev = "md[0-9]+"; }
 
 my $code = "UNKNOWN";
 my $msg = "";


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.