diff --git a/xymon/plugins/client/ext/smartoverall b/xymon/plugins/client/ext/smartoverall index cc4ab74..3aa8350 100755 --- a/xymon/plugins/client/ext/smartoverall +++ b/xymon/plugins/client/ext/smartoverall @@ -50,7 +50,7 @@ is_disk_support_smart() { _disk="${1}" _type="${2}" - _smarctl_support_result="/tmp/dsupport.$(basename "${_disk}")" + _smarctl_support_result="${XYMONTMP}/${MACHINEDOTS}.smartoverall.support.$(basename "${_disk}")" smart_support_msg="" @@ -81,7 +81,10 @@ is_disk_support_smart() { [ "${debug}" -eq "0" ] && printf "${c_magentab}%-6b${c_reset}\n" "DEBUG : is_disk_support_smart func − SMART is not fully supported on : ${_disk} with ${_type} type. See smartctl informations :\n${smart_support_msg}" fi - rm -f -- "${_smarctl_support_result}" +## Clean temp files +### As the Xymon's tmpdir is used to store log files, no need to delete them at +### the end of the script. They will be emptied at the beginning of the next run. + } ## ]]] ## Test the type of disk with smartctl [[[ @@ -232,7 +235,7 @@ $(< "${plugin_state}" cut -c2-) ==================== Detailed status ==================== -$(cat /tmp/dres) +$(cat "${plugin_result}") " # Clean temp files