diff --git a/xymon/plugins/client/ext/smart b/xymon/plugins/client/ext/smart index ffaec6e..7a46e64 100755 --- a/xymon/plugins/client/ext/smart +++ b/xymon/plugins/client/ext/smart @@ -13,7 +13,7 @@ while read LINE do DISK=$(echo "${LINE}" | cut -d" " -f1) TYPE=$(echo "${LINE}" | cut -d" " -f3) - DRES=`/usr/sbin/smartctl -H -d "${TYPE}" -n standby "${DISK}"` + DRES=$(/usr/sbin/smartctl -H -d "${TYPE}" -n standby "${DISK}") DCODE=$? DSTBY=$(( $DCODE & 2 )) DFAIL=$(( $DCODE & 8 )) @@ -42,15 +42,15 @@ do echo "" >>/tmp/dres done < /tmp/dscan >/tmp/dcheck -COLOR=`cat /tmp/dcheck | awk '{print $1}' | sort | uniq | head -1 | cut -c3-` +COLOR=$(cat /tmp/dcheck | awk '{print $1}' | sort | uniq | head -1 | cut -c3-) $XYMON $XYMSRV "status ${MACHINE}.smart ${COLOR} SMART health check -`cat /tmp/dcheck | cut -c2-` +$(cat /tmp/dcheck | cut -c2-) ==================== Detailed status ==================== -`cat /tmp/dres` +$(cat /tmp/dres) " rm -f /tmp/dres /tmp/dcheck /tmp/dscan