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
This commit is contained in:
ImAPerson 2024-08-12 01:44:53 -04:00 committed by GitHub
parent 64a3884695
commit 016bf27cb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -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})

View file

@ -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