mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
- Update to 1.3
- Add MASTER_SITE_LOCAL as a mirror - Add patches to correct GEOM status check PR: ports/129733 Submitted by: andriy.tovstik@gmail.com Reviewed by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> (maintainer)
This commit is contained in:
parent
0d7150ecbc
commit
178eb5bf76
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=224654
@ -6,11 +6,13 @@
|
||||
#
|
||||
|
||||
PORTNAME= geom
|
||||
PORTVERSION= 1.0
|
||||
PORTVERSION= 1.3
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= http://www.geocities.com/ntb4real/proj/
|
||||
MASTER_SITES= http://www.geocities.com/ntb4real/proj/ \
|
||||
${MASTER_SITE_LOCAL}
|
||||
MASTER_SITE_SUBDIR= wxs
|
||||
PKGNAMEPREFIX= nagios-
|
||||
DISTNAME= check_geom
|
||||
DISTNAME= check_geom-${PORTVERSION}
|
||||
|
||||
MAINTAINER= rea-fbsd@codelabs.ru
|
||||
COMMENT= Nagios plug-in to get geom(8) components status
|
||||
@ -18,6 +20,7 @@ COMMENT= Nagios plug-in to get geom(8) components status
|
||||
USE_PERL5= yes
|
||||
NO_WRKSUBDIR= yes
|
||||
NO_BUILD= yes
|
||||
PATCH_STRIP= -p1
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${PREFIX}/libexec/nagios
|
||||
|
@ -1,3 +1,3 @@
|
||||
SIZE (check_geom.tar.gz) = 1545
|
||||
MD5 (check_geom.tar.gz) = ec6aa5d69b0693a71cf0129016507d0f
|
||||
SHA256 (check_geom.tar.gz) = ba787de1ac1df400151f8bde5b3db15af4ca2f3a3e8ec4f48c30052091f30444
|
||||
MD5 (check_geom-1.3.tar.gz) = f0744072bb1a7c5c7adf5f6c5c45aad0
|
||||
SHA256 (check_geom-1.3.tar.gz) = 363c0a000dc30805e53cb4674b46902997b4db717c5128a04c56528b62da4513
|
||||
SIZE (check_geom-1.3.tar.gz) = 1558
|
||||
|
14
net-mgmt/nagios-geom/files/patch-add-perfdata
Normal file
14
net-mgmt/nagios-geom/files/patch-add-perfdata
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/check_geom b/check_geom
|
||||
index e7c776c..d8c1402 100755
|
||||
--- a/check_geom
|
||||
+++ b/check_geom
|
||||
@@ -127,6 +127,8 @@ if ($state ne "OK") {
|
||||
}
|
||||
|
||||
#goats away!
|
||||
-$msg = sprintf "%s/%s %s { %s }\n", $class, $volume, $status, $compo;
|
||||
+my $perfdata = sprintf "%s=%d;;;0;", "geom_" . $class, $found;
|
||||
+$msg = sprintf "%s/%s %s { %s }|%s\n", $class, $volume, $status, $compo,
|
||||
+ $perfdata;
|
||||
print $state, " ", $msg;
|
||||
exit ($ERRORS{$state});
|
@ -1,38 +0,0 @@
|
||||
--- check_geom.orig 2007-07-03 15:55:27.000000000 +0400
|
||||
+++ check_geom 2008-08-20 15:30:57.000000000 +0400
|
||||
@@ -33,6 +33,7 @@
|
||||
my %ERRORS=('DEPENDENT'=>4,'UNKNOWN'=>3,'OK'=>0,'WARNING'=>1,'CRITICAL'=>2);
|
||||
my $state="UNKNOWN";
|
||||
my $msg="FAILURE";
|
||||
+my $perfdata="";
|
||||
|
||||
if ($#ARGV < 1) {
|
||||
print "Not enough arguments!\nUsage: $0 <class> <device>\n";
|
||||
@@ -63,7 +64,7 @@
|
||||
|
||||
chomp;
|
||||
if ($found) {
|
||||
- if (/^$class\//) {
|
||||
+ if (/^\s*$class\//) {
|
||||
last;
|
||||
} else {
|
||||
my ($vgh) = /\s+(.*)/;
|
||||
@@ -72,7 +73,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (/$class\/$volume/) {
|
||||
+ if (/^\s*$class\/$volume/) {
|
||||
($name, $status, $compo) = /(\S+)\s+(\S+)\s+(.*)$/;
|
||||
$found=1;
|
||||
}
|
||||
@@ -127,6 +128,7 @@
|
||||
}
|
||||
|
||||
#goats away!
|
||||
-$msg = sprintf "%s/%s %s { %s }\n", $class, $volume, $status, $compo;
|
||||
-print $state, " ", $msg;
|
||||
+$msg = sprintf "%s/%s %s { %s }", $class, $volume, $status, $compo;
|
||||
+$perfdata = sprintf "%s=%d;;;0;", "geom_" . $class, $found;
|
||||
+print $state, " ", $msg, "|", $perfdata, "\n";
|
||||
exit ($ERRORS{$state});
|
13
net-mgmt/nagios-geom/files/patch-fix-class-logics
Normal file
13
net-mgmt/nagios-geom/files/patch-fix-class-logics
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/check_geom b/check_geom
|
||||
index e35be05..e7c776c 100755
|
||||
--- a/check_geom
|
||||
+++ b/check_geom
|
||||
@@ -92,7 +92,7 @@ if (($class eq "mirror" || $class eq "raid3") && $status =~ /COMPLETE/ ) {
|
||||
$state = "OK";
|
||||
}
|
||||
|
||||
-if ($class eq "stripe" || $class eq "concat" || $class eq "shsec" && $status =~ /UP/) {
|
||||
+if (($class eq "stripe" || $class eq "concat" || $class eq "shsec") && $status =~ /UP/) {
|
||||
$state = "OK";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user