summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d2e5194)
raw | patch | inline | side by side (parent: d2e5194)
author | Matthew Kent <mattkent@users.sourceforge.net> | |
Mon, 29 Nov 2004 04:49:10 +0000 (04:49 +0000) | ||
committer | Matthew Kent <mattkent@users.sourceforge.net> | |
Mon, 29 Nov 2004 04:49:10 +0000 (04:49 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@948 f882894a-f735-0410-b71e-b25c423dba1c
contrib/check_linux_raid.pl | patch | blob | history |
index 25fdf88a7a5f8224eb950bcc893251de1c09d9cb..2a58dbe0e8e8e2ab4f3f4bdcebed060eb09f32b6 100644 (file)
my %ERRORS=('DEPENDENT'=>4,'UNKNOWN'=>3,'OK'=>0,'WARNING'=>1,'CRITICAL'=>2);
+# die with an error if we're not on Linux
+if ($^O ne 'linux') {
+ print "This plugin only applicable on Linux.\n";
+ exit $ERRORS{'UNKNOWN'};
+}
+
open (MDSTAT, "</proc/mdstat") or die "Failed to open /proc/mdstat";
my $found = 0;
my $status = "";
last;
}
} else {
- if (/$ARGV[0]/) {
+ if (/^$ARGV[0]\s*:/) {
$found = 1;
if (/active/) {
$active = 1;