* usr/lib/byobu/cpu_temp: LP: #799237

- fix temperature on Atom D510
This commit is contained in:
Dustin Kirkland 2011-06-28 22:52:37 +00:00
commit ffe0e5134d
2 changed files with 5 additions and 5 deletions

2
debian/changelog vendored
View file

@ -3,6 +3,8 @@ byobu (4.17) unreleased; urgency=low
* usr/bin/byobu-launch: LP: #802646
- ensure that .profile gets sourced if launching byobu by default,
but also make sure that we won't recurse!
* usr/lib/byobu/cpu_temp: LP: #799237
- fix temperature on Atom D510
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 27 Jun 2011 14:14:17 +0000

View file

@ -19,11 +19,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
CPU_TEMP_DIR="/proc/acpi/thermal_zone"
__cpu_temp_detail() {
local i
for i in "$CPU_TEMP_DIR"/*; do
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/temp*_input /sys/class/hwmon/hwmon*/device/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature; do
[ -r "$i" ] || continue
echo "$i:"
cat "$i"/*
@ -32,7 +30,7 @@ __cpu_temp_detail() {
__cpu_temp() {
local i t unit
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal "$CPU_TEMP_DIR"/*/temperature; do
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/temp*_input /sys/class/hwmon/hwmon*/device/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature; do
case "$i" in
*temp*_input)
[ -s "$i" ] && read t < "$i" && t=$(($t/1000))
@ -41,7 +39,7 @@ __cpu_temp() {
[ -s "$i" ] && t=$(sed -e "s/^[^0-9]\+//" -e "s/\s.*$//" "$i")
;;
esac
if [ -n "$t" ]; then
if [ -n "$t" ] && [ "$t" -gt 0 ]; then
unit="$ICON_C"
if [ "$TEMP" = "F" ]; then
t=$(($t*9/5 + 32))