mirror of
https://github.com/opnsense/plugins.git
synced 2026-04-21 22:28:36 -04:00
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:
parent
64a3884695
commit
016bf27cb5
2 changed files with 4 additions and 4 deletions
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue