diff --git a/smart.run.test.sh b/smart.run.test.sh index 2e4aa44..edd30db 100755 --- a/smart.run.test.sh +++ b/smart.run.test.sh @@ -105,7 +105,7 @@ is_disk_path_support_smart() { true > "${_smarctl_support_result}" ## 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 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}." 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." + smartctl --device="${disk_type}" --test="${test_to_run}" -- "${disk_path}" fi done < "${smart_device_list}"