bin/fan_speed: improve the logic for find the fan_speed system monitor

LP: #439524
This commit is contained in:
Dustin Kirkland 2009-09-30 13:17:09 -05:00
commit 6d9950fd61
2 changed files with 9 additions and 5 deletions

View file

@ -27,7 +27,10 @@ if [ "$1" = "--detail" ]; then
exit 0
fi
for i in `ls "$DIR/"*"/device/fan"* 2>/dev/null`; do
printf "\005{=b }%s\005{-}\005{= }rpm\005{-} " `cat $i`
break
for i in $(find $DIR/*/*/ -type f -name "fan1_input"); do
speed=$(cat "$i")
if [ "$speed" -gt 0 ]; then
printf "\005{=b }%s\005{-}\005{= }rpm\005{-} " "$speed"
exit 0
fi
done

5
debian/changelog vendored
View file

@ -1,8 +1,9 @@
byobu (2.36) unreleased; urgency=low
* UNRELEASED
* bin/fan_speed: improve the logic for find the fan_speed system monitor
LP: #439524
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 22 Sep 2009 09:40:10 -0700
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 30 Sep 2009 13:16:38 -0500
byobu (2.35-0ubuntu1) karmic; urgency=low