Run smartctl command to launch test
This commit is contained in:
parent
a1bfb78037
commit
489983bedb
|
@ -105,7 +105,7 @@ is_disk_path_support_smart() {
|
||||||
true > "${_smarctl_support_result}"
|
true > "${_smarctl_support_result}"
|
||||||
|
|
||||||
## Grep only "support" lines from disk's informations
|
## Grep only "support" lines from disk's informations
|
||||||
smartctl -d "${_disk_type}" -i -- "${_disk_path}" | grep -E "^SMART support is:" -- >> "${_smarctl_support_result}"
|
smartctl --device="${_disk_type}" --info -- "${_disk_path}" | grep -E "^SMART support is:" -- >> "${_smarctl_support_result}"
|
||||||
|
|
||||||
## If the file is not empty
|
## If the file is not empty
|
||||||
if test -s "${_smarctl_support_result}"; then
|
if test -s "${_smarctl_support_result}"; then
|
||||||
|
@ -174,6 +174,7 @@ if test -s "${smart_device_list}"; then
|
||||||
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : SMART is not fully supported on ${disk_path}."
|
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : SMART is not fully supported on ${disk_path}."
|
||||||
else
|
else
|
||||||
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : Run a ${test_to_run} SMART test on disk ${disk_path}, with ${disk_type} TYPE."
|
[ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : Run a ${test_to_run} SMART test on disk ${disk_path}, with ${disk_type} TYPE."
|
||||||
|
smartctl --device="${disk_type}" --test="${test_to_run}" -- "${disk_path}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done < "${smart_device_list}"
|
done < "${smart_device_list}"
|
||||||
|
|
Loading…
Reference in New Issue