diff --git a/plugins/other/smart-by-id_ b/plugins/other/smart-by-id_ index 14cf3b1e..04ae3a49 100755 --- a/plugins/other/smart-by-id_ +++ b/plugins/other/smart-by-id_ @@ -1,7 +1,7 @@ #!/bin/bash -DISK="${0/*smart-by-id_/}" -SMARTCTL="smartctl $SMARTOPTS" +DISK=${0/*smart-by-id_/} +SMARTCTL="`which smartctl | head -1` $SMARTOPTS" echo "# $DISK" @@ -28,7 +28,7 @@ config) OL=`echo -n ${OP[1]} | tr '_' ' '` echo ${ON}.label ${OL} echo ${ON}.draw LINE2 - echo ${ON}.critical $((${OP[5]})): + echo ${ON}.critical ${OP[5]}: done ;; suggest) @@ -45,7 +45,8 @@ suggest) if [ $((SES & 224)) -gt 0 ] ; then SES=1 ; fi fi echo "smartctl_exit_class.value $SES" - $SMARTCTL -A /dev/disk/by-id/$DISK | awk '/0x/ { gsub(/[^a-Z0-9]/,"_",$2); print $2.".value",$4; }' + $SMARTCTL -A /dev/disk/by-id/$DISK | awk '/0x/ { gsub(/[^a-zA-Z0-9]/,"_",$2); print $2.".value",$4; }' ;; esac +#exit 0 \ No newline at end of file