diff --git a/xymon/plugins/client/ext/smartoverall b/xymon/plugins/client/ext/smartoverall index 7c3e00a..cbc832d 100755 --- a/xymon/plugins/client/ext/smartoverall +++ b/xymon/plugins/client/ext/smartoverall @@ -158,11 +158,13 @@ choose_correct_type() { # Create or empty previous files true > "${plugin_result}" true > "${plugin_state}" -true > "${device_list}" +regenerate_if_too_old "${device_list}" 1440 true > "${drivedb_list}" -# Get the list of all available devices -smartctl --scan >> "${device_list}" +# Get the list of all available devices if the previous list was emptied +if test ! -s "${device_list}"; then + smartctl --scan >> "${device_list}" +fi # If the file is not empty if test -s "${device_list}"; then