Add state and message if logging aren't supported

This commit is contained in:
Jeremy Gardais 2020-02-26 11:43:15 +01:00
parent 094c1d0f93
commit 4bca7327b5
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 3 additions and 0 deletions

View File

@ -155,6 +155,9 @@ https://www.smartmontools.org/wiki/FAQ#SmartmontoolsDatabase"
if smartctl -d "${TYPE}" -l selftest "${DISK}" | grep -qi -- "No self-tests"; then if smartctl -d "${TYPE}" -l selftest "${DISK}" | grep -qi -- "No self-tests"; then
DSELFTEST_MSG="&red No self-tests recorded:" DSELFTEST_MSG="&red No self-tests recorded:"
DCODE="8" DCODE="8"
## If the device doesn't support test logging
elif smartctl -d "${TYPE}" -l selftest "${DISK}" | grep -qEi -- "does not support.*logging"; then
DSELFTEST_MSG="&clear Test logging are not supported:"
else else
DSELFTEST_MSG="" DSELFTEST_MSG=""
fi fi