From 489983bedb4ea66ee639fa830bda1ac6da1e0b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 27 Feb 2020 16:15:11 +0100 Subject: [PATCH] Run smartctl command to launch test --- smart.run.test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}"