xbmc: change cputemp script to support more devices

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-10-05 02:40:46 +02:00
parent 27b853cabe
commit 4cb1a2b2f0

View File

@ -25,7 +25,8 @@ TEMP="0"
if [ -f /sys/class/thermal/thermal_zone0/temp ]; then
TEMP=`echo "$(cat /sys/class/thermal/thermal_zone0/temp)/1000" |bc`
elif [ -f /usr/bin/sensors ]; then
TEMP=`/usr/bin/sensors -u | head -6 |grep "temp1_input"| awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'`
# TEMP=`/usr/bin/sensors -u | head -6 |grep "temp1_input"| awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'`
TEMP=`/usr/bin/sensors -u | tail -n4 | grep temp1_input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'`
fi
echo "${TEMP} C"