Bug 201767

Summary: [patch] net-mgmt/nagios-check_smartmon
Product: Ports & Packages Reporter: Dan Langille <dvl>
Component: Individual Port(s)Assignee: Dan Langille <dvl>
Status: Closed FIXED    
Severity: Affects Many People CC: ports
Priority: Normal Keywords: patch
Version: LatestFlags: ports: maintainer-feedback+
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235475
Attachments:
Description Flags
patch for file/patch-check_smartmon none

Description Dan Langille freebsd_committer freebsd_triage 2015-07-22 17:44:39 UTC
Created attachment 159074 [details]
patch for file/patch-check_smartmon

Allow check_smartmon to work with da* devices

Without this patch, this error is encountered:

$ sudo /usr/local/libexec/nagios/check_smartmon -d /dev/da10
Traceback (most recent call last):
  File "/usr/local/libexec/nagios/check_smartmon", line 307, in <module>
    (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


I've been using this patch at home for two years now. I recently encountered the bug on a new system. https://dan.langille.org/2013/07/25/nagios-check_smartmon-fails-with-sata-presented-as-scsi-devices/
Comment 1 Krzysztof 2015-07-22 17:49:41 UTC
OK, I approve this patch
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-07-23 15:59:28 UTC
A commit references this bug:

Author: dvl
Date: Thu Jul 23 15:59:14 UTC 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)

Changes:
  head/net-mgmt/nagios-check_smartmon/Makefile
  head/net-mgmt/nagios-check_smartmon/files/patch-check_smartmon
Comment 3 Dan Langille freebsd_committer freebsd_triage 2015-07-23 16:03:54 UTC
Committed. Thank you.