mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-20 13:33:23 -07:00
usr/lib/byobu/cpu_temp: test that file exists, is readable, and has
size > 0, LP: #696071
This commit is contained in:
parent
26b830e8ae
commit
7ea2c35be1
2 changed files with 4 additions and 2 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -14,6 +14,8 @@ byobu (3.20) unreleased; urgency=low
|
|||
* usr/lib/byobu/cpu_temp: find the temp monitor, LP: #676080
|
||||
* usr/lib/byobu/battery, usr/share/man/man1/byobu.1: allow for
|
||||
overriding detected BATTERY, LP: #693560
|
||||
* usr/lib/byobu/cpu_temp: test that file exists, is readable, and has
|
||||
size > 0, LP: #696071
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 28 Dec 2010 00:05:13 -0600
|
||||
|
||||
|
|
|
@ -34,10 +34,10 @@ fi
|
|||
for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal $DIR/*/temperature; do
|
||||
case "$i" in
|
||||
*temp*_input)
|
||||
t=$(awk '{printf "%0.f",$1/1000}' "$i")
|
||||
[ -s "$i" ] && t=$(awk '{printf "%0.f",$1/1000}' "$i")
|
||||
;;
|
||||
*)
|
||||
t=$(sed -e "s/^[^0-9]\+//" -e "s/\s.*$//" "$i")
|
||||
[ -s "$i" ] && t=$(sed -e "s/^[^0-9]\+//" -e "s/\s.*$//" "$i")
|
||||
;;
|
||||
esac
|
||||
if [ -n "$t" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue