From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 30 19:40:13 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CA841065680 for ; Wed, 30 Nov 2011 19:40:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 42AB98FC16 for ; Wed, 30 Nov 2011 19:40:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pAUJeCEC031818 for ; Wed, 30 Nov 2011 19:40:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pAUJeCw1031817; Wed, 30 Nov 2011 19:40:12 GMT (envelope-from gnats) Resent-Date: Wed, 30 Nov 2011 19:40:12 GMT Resent-Message-Id: <201111301940.pAUJeCw1031817@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3996E106566C for ; Wed, 30 Nov 2011 19:31:30 +0000 (UTC) (envelope-from root@claimlynx.com) Received: from alcatraz.claimlynx.com (alcatraz.claimlynx.com [216.17.83.245]) by mx1.freebsd.org (Postfix) with ESMTP id 19E508FC08 for ; Wed, 30 Nov 2011 19:31:29 +0000 (UTC) Received: from leopard.claimlynx.com (leopard.claimlynx.com [216.17.68.149]) by alcatraz.claimlynx.com (Postfix) with ESMTP id 518271CC3E for ; Wed, 30 Nov 2011 13:31:29 -0600 (CST) Received: by leopard.claimlynx.com (Postfix, from userid 0) id 41C17358D0F; Wed, 30 Nov 2011 13:31:29 -0600 (CST) Message-Id: <20111130193129.41C17358D0F@leopard.claimlynx.com> Date: Wed, 30 Nov 2011 13:31:29 -0600 (CST) From: Thomas Johnson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/162975: net-mgmt/nagios-check_smartmon causes error when run X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: root@claimlynx.com List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 19:40:13 -0000 >Number: 162975 >Category: ports >Synopsis: net-mgmt/nagios-check_smartmon causes error when run >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Nov 30 19:40:11 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Thomas Johnson >Release: FreeBSD 8.2-RELEASE-p3 amd64 >Organization: ClaimLynx, Inc. >Environment: System: FreeBSD leopard.claimlynx.com 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The check script provided by net-mgmt/nagios-check_smartmon produces an error when run. I just installed this port today, along with sysutils/smartmontools. I receive the following output when run against a SATA disk in a USB enclosure: -> /usr/local/libexec/nagios/check_smartmon -d /dev/da0 -v 3 Get device name Device: /dev/da0 Check device Check if /dev/da0 does exist and can be read Check if /usr/local/sbin/smartctl does exist and can be read Path to smartctl: /usr/local/sbin/smartctl Get device type Device type: scsi Call smartctl Get device health status: /usr/local/sbin/smartctl -H /dev/da0 Get device temperature: /usr/local/sbin/smartctl -A /dev/da0 Parse smartctl output parseOutput: Device type is scsi Traceback (most recent call last): File "/usr/local/libexec/nagios/check_smartmon", line 307, in (healthStatus, temperature) = parseOutput(healthStatusOutput, temperatureOutput, devtype) File "/usr/local/libexec/nagios/check_smartmon", line 216, in parseOutput vprint(3, "Health status: %s" % healthStatus) UnboundLocalError: local variable 'healthStatus' referenced before assignment >How-To-Repeat: Repeatable when run in the manner described in the description. My relevant port versions are as follows: python27-2.7.2_3 nagios-check_smartmon-20100318_1 smartmontools-5.42_1 >Fix: Nagios Exchange has an updated version of this script that appears to work fine. http://exchange.nagios.org/directory/Plugins/Uncategorized/Operating-Systems/Linux/check_smartmon/details >Release-Note: >Audit-Trail: >Unformatted: