mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user