git: 8179e0a7720b - main - net-mgmt/smartctl_exporter: pick up more devices

From: Xin LI <delphij_at_FreeBSD.org>
Date: Fri, 18 Oct 2024 07:17:42 UTC
The branch main has been updated by delphij:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8179e0a7720bdcfbde72fae87c549c93e2025572

commit 8179e0a7720bdcfbde72fae87c549c93e2025572
Author:     Lexi Winter <lexi.freebsd@le-fay.org>
AuthorDate: 2024-10-18 07:07:30 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2024-10-18 07:17:26 +0000

    net-mgmt/smartctl_exporter: pick up more devices
    
    PR:             ports/282015
---
 net-mgmt/smartctl_exporter/Makefile                   | 2 +-
 net-mgmt/smartctl_exporter/files/smartctl_exporter.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-mgmt/smartctl_exporter/Makefile b/net-mgmt/smartctl_exporter/Makefile
index 272ae47f4a5a..b4142aa20421 100644
--- a/net-mgmt/smartctl_exporter/Makefile
+++ b/net-mgmt/smartctl_exporter/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=		smartctl_exporter
 PORTVERSION=		0.12.0
 DISTVERSIONPREFIX=	v
-PORTREVISION=	6
+PORTREVISION=		7
 CATEGORIES=		net-mgmt
 
 MAINTAINER=		delphij@FreeBSD.org
diff --git a/net-mgmt/smartctl_exporter/files/smartctl_exporter.in b/net-mgmt/smartctl_exporter/files/smartctl_exporter.in
index 255d01c78134..5477b36f398d 100644
--- a/net-mgmt/smartctl_exporter/files/smartctl_exporter.in
+++ b/net-mgmt/smartctl_exporter/files/smartctl_exporter.in
@@ -28,7 +28,7 @@ load_rc_config $name
 : ${smartctl_exporter_enable:="NO"}
 : ${smartctl_exporter_user:="root"}
 : ${smartctl_exporter_listen_address:="localhost:9633"}
-: ${smartctl_exporter_devices:="$(geom disk status -s | cut -f1 -d\ | sed -e s,^,/dev/,g)"}
+: ${smartctl_exporter_devices:="$(geom disk status -s | grep -vE 'cd[0-9]' | awk '{print $1;}' | sed -e s,^,/dev/,g)"}
 : ${smartctl_exporter_log_level:=""}
 : ${smartctl_exporter_log_format:=""}