From 016bf27cb5a2ad4d63355def079c94c4e84da8a5 Mon Sep 17 00:00:00 2001 From: ImAPerson Date: Mon, 12 Aug 2024 01:44:53 -0400 Subject: [PATCH] smart nvd to nda (#4173) FreeBSD 14 changed from the nvd driver to the nda driver for x86. This change modifies the smart service to utilize the new driver name on the UI and the backend script that pulls the smartctl code (thanks @jbilac!). Issue https://github.com/opnsense/plugins/issues/4155 --- .../src/opnsense/scripts/OPNsense/Smart/detailed_list.sh | 6 +++--- .../src/opnsense/service/conf/actions.d/actions_smart.conf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysutils/smart/src/opnsense/scripts/OPNsense/Smart/detailed_list.sh b/sysutils/smart/src/opnsense/scripts/OPNsense/Smart/detailed_list.sh index d8a3b55c1..7f0a8a504 100755 --- a/sysutils/smart/src/opnsense/scripts/OPNsense/Smart/detailed_list.sh +++ b/sysutils/smart/src/opnsense/scripts/OPNsense/Smart/detailed_list.sh @@ -30,9 +30,9 @@ RESULT= for DEV in $(sysctl -n kern.disks); do IDENT=$(/usr/sbin/diskinfo -s ${DEV}) - if [ "${DEV#nvd}" != "${DEV}" ]; then - # the disk formerly know as nvdX - DEV="nvme${DEV#nvd}" + if [ "${DEV#nda}" != "${DEV}" ]; then + # the disk formerly know as ndaX + DEV="nvme${DEV#nda}" fi STATE=$(/usr/local/sbin/smartctl -jH /dev/${DEV}) diff --git a/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf b/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf index 708581525..03a594580 100644 --- a/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf +++ b/sysutils/smart/src/opnsense/service/conf/actions.d/actions_smart.conf @@ -1,5 +1,5 @@ [list] -command:sysctl -n kern.disks | sed s:nvd:nvme:g +command:sysctl -n kern.disks | sed s:nda:nvme:g parameters: type:script_output message:list installed devices