From d6befb67e2252eacc0c42313fea35758e1ad9e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 4 Mar 2020 11:00:34 +0100 Subject: [PATCH] Move _smarctl_support_result file to XYMONTMP dir --- xymon/plugins/client/ext/smartoverall | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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