Don't mark drives in standby as failed (#59)
Some checks failed
Build kernel module for TrueNAS / build-and-run (push) Has been cancelled

The standby return code of smartctl is updated to 0 to avoid detecting it as a failure.
This commit is contained in:
Thomas
2025-06-07 05:31:44 +02:00
committed by GitHub
parent 276ae34cd1
commit dc04db484c

View File

@@ -274,7 +274,8 @@ if [ "$CHECK_SMART" = true ]; then
dev=${devices[$led]} dev=${devices[$led]}
/usr/sbin/smartctl -H /dev/${dev} -n standby,1 &> /dev/null # read the smart status return code, but ignore if the drive is on standby
/usr/sbin/smartctl -H /dev/${dev} -n standby,0 &> /dev/null
RET=$? RET=$?
# check return code for critical errors (any bit set except bit 5) # check return code for critical errors (any bit set except bit 5)