Try to display info even for unsupported device

This commit is contained in:
Jeremy Gardais 2020-02-21 08:50:07 +01:00
parent beee18371c
commit f433389f0e
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 3 additions and 0 deletions

View File

@ -105,6 +105,9 @@ if test -s /tmp/dscan; then
DRES=$(printf '%s' "SMART Health Status can't be determine because of:\n${SMART_SUPPORT_MSG}") DRES=$(printf '%s' "SMART Health Status can't be determine because of:\n${SMART_SUPPORT_MSG}")
DCODE="2" DCODE="2"
TYPE="unsupported" TYPE="unsupported"
### Still try to display informations about unsupported device (eg. RAID controller,…)
DID="unsupported-${DISK}"
DINFO=$(smartctl -i -d "${SCANNED_TYPE}" "${DISK}" | grep -v -E "^smartctl|^Copyright|^$" || printf '%s' "Can't get informations due to no SMART support.")
else else
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG: SMART seems fully supported, proceed normally." [ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG: SMART seems fully supported, proceed normally."
### Get SMART Health Status and return code ### Get SMART Health Status and return code