svn commit: r392737 - in head/net-mgmt/nagios-check_smartmon: . files

Dan Langille dvl at FreeBSD.org
Thu Jul 23 15:59:15 UTC 2015


Author: dvl
Date: Thu Jul 23 15:59:13 2015
New Revision: 392737
URL: https://svnweb.freebsd.org/changeset/ports/392737

Log:
  Allow check_smartmon to work with da* devices
  
  PR:          ports/201767
  Approved by: Krzysztof (maintainer), X (mat)

Modified:
  head/net-mgmt/nagios-check_smartmon/Makefile
  head/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon

Modified: head/net-mgmt/nagios-check_smartmon/Makefile
==============================================================================
--- head/net-mgmt/nagios-check_smartmon/Makefile	Thu Jul 23 15:57:54 2015	(r392736)
+++ head/net-mgmt/nagios-check_smartmon/Makefile	Thu Jul 23 15:59:13 2015	(r392737)
@@ -3,7 +3,7 @@
 
 PORTNAME=	check_smartmon
 PORTVERSION=	20100318
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net-mgmt
 MASTER_SITES=	http://nognu.de/s/FreeBSD/distfiles/
 PKGNAMEPREFIX=	nagios-

Modified: head/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon
==============================================================================
--- head/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon	Thu Jul 23 15:57:54 2015	(r392736)
+++ head/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon	Thu Jul 23 15:59:13 2015	(r392737)
@@ -1,20 +1,26 @@
---- ./check_smartmon.orig	2010-03-18 18:56:53.000000000 +0100
-+++ ./check_smartmon	2010-04-23 22:53:13.000000000 +0200
-@@ -229,11 +229,14 @@
-         # fi
+--- check_smartmon.orig	2015-07-22 17:32:58 UTC
++++ check_smartmon
+@@ -59,7 +59,7 @@ def parseCmdLine(args):
+                         metavar="LEVEL", help="set verbosity level to LEVEL; defaults to 0 (quiet), \
+                                         possible values go up to 3")
+         parser.add_option("-t", "--type", action="store", dest="devtype", default="ata", metavar="DEVTYPE",
+-                        help="type of device (ATA|SCSI)")
++                        help="type of device (ata|scsi)")
+         parser.add_option("-w", "--warning-threshold", metavar="TEMP", action="store",
+                         type="int", dest="warningThreshold", default=55,
+                         help="set temperature warning threshold to given temperature (defaults to 55)")
+@@ -291,10 +291,10 @@ if __name__ == "__main__":
+         vprint(2, "Get device type")
+         devtype = options.devtype
+         if not devtype:
+-                devtype = "ATA"
+-
+-        if device_re.search( device ):
+-                devtype = "scsi"
++                if device_re.search( device ):
++                        devtype = "scsi"
++                else:
++                        devtype = "ata"
  
-         if temperature > criticalThreshold:
--                return (2, "CRITICAL: device temperature (%d) exceeds critical temperature threshold (%s)" % (temperature, criticalThreshold))
-+                return (2, "CRITICAL: device temperature (%d) exceeds critical temperature threshold (%s)|TEMP=%d;%d;%d;" 
-+			% (temperature, criticalThreshold, temperature, warningThreshold, criticalThreshold))
-         elif temperature > warningThreshold:
--                return (1, "WARNING: device temperature (%d) exceeds warning temperature threshold (%s)" % (temperature, warningThreshold))
-+                return (1, "WARNING: device temperature (%d) exceeds warning temperature threshold (%s)|TEMP=%d;%d;%d;" 
-+			% (temperature, warningThreshold, temperature, warningThreshold, criticalThreshold))
-         else:
--                return (0, "OK: device is functional and stable (temperature: %d)" % temperature)
-+                return (0, "OK: device is functional and stable (temperature: %d)|TEMP=%d;%d;%d;" 
-+			% (temperature,  temperature, warningThreshold, criticalThreshold))
-         # fi
- # end
+         vprint(1, "Device type: %s" % devtype)
  


More information about the svn-ports-head mailing list