Bug 201767 - [patch] net-mgmt/nagios-check_smartmon
Summary: [patch] net-mgmt/nagios-check_smartmon
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: Dan Langille
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-22 17:44 UTC by Dan Langille
Modified: 2019-02-04 18:21 UTC (History)
1 user (show)

See Also:
ports: maintainer-feedback+


Attachments
patch for file/patch-check_smartmon (1.21 KB, patch)
2015-07-22 17:44 UTC, Dan Langille
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.