Handle neagative temperature in _lp_acpi_temp

This commit is contained in:
Vincent Lara 2014-07-13 23:02:33 +02:00 committed by Olivier Mengué
parent d456155cd7
commit 71321c84ab

View File

@ -1380,7 +1380,7 @@ _lp_temp_sensors()
_lp_temp_acpi()
{
local i
for i in $(acpi -t | sed 's/.* \([0-9]*\)\.[0-9]* degrees C$/\1/p'); do
for i in $(acpi -t | sed 's/.* \([-]\?[0-9]*\)\.[0-9]* degrees C$/\1/p'); do
[[ $i -gt $temperature ]] && temperature=$i
done
}