Limit parsing to only grab the first result found for the sensor. Sometimes you get more than one result for things like CPU cores (Quad core printing as: Core0,Core0,Core1,Core1 on a Toshiba laptop with sensor k8temp-pci-00c3)
This commit is contained in:
parent
6df8362ab0
commit
0fe7e5aa90
@ -190,9 +190,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
#Get the temperature
|
#Get the temperature
|
||||||
TEMP=`${SENSORPROG} | grep "$sensor" | cut -d+ -f2 | cut -c1-2 `
|
TEMP=`${SENSORPROG} | grep "$sensor" | cut -d+ -f2 | cut -c1-2 | head -n1`
|
||||||
#Old way - Get the temperature
|
#Old way - Get the temperature
|
||||||
#TEMP=`${SENSORPROG} | grep "$sensor" | awk '{print $3}' | cut -c2-3`
|
#TEMP=`${SENSORPROG} | grep "$sensor" | awk '{print $3}' | cut -c2-3 | head -n1`
|
||||||
|
|
||||||
|
|
||||||
# Check if the thresholds have been set correctly
|
# Check if the thresholds have been set correctly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user