diff --git a/plugins/other/hddtemp b/plugins/other/hddtemp index 5d3053b0..a20154b2 100755 --- a/plugins/other/hddtemp +++ b/plugins/other/hddtemp @@ -37,10 +37,10 @@ # #%# family=contrib -HDDTEMP=/usr/sbin/hddtemp +hddtemp=${hddtemp:-/usr/sbin/hddtemp} if [ "$1" = "autoconf" ]; then - if [ -x "$HDDTEMP" ]; then + if [ -x "$hddtemp" ]; then echo yes exit 0 else @@ -55,10 +55,8 @@ if [ "$1" = "config" ]; then echo 'graph_args --base 1000 -l 0' echo 'graph_vlabel temp in °C' echo 'graph_category sensors' - #for a in $drives ; do echo $a.label $a ; done - for a in $drives ; do echo $a.label $a `hddtemp -q /dev/$a | cut -d: -f 2` ; done + for a in $drives ; do echo $a.label $a `$hddtemp -q /dev/$a | cut -d: -f 2` ; done exit 0 fi -for a in $drives ; do printf "$a.value $(hddtemp -n -q /dev/$a)\n" ; done - +for a in $drives ; do printf "$a.value $($hddtemp -n -q /dev/$a)\n" ; done