diff -u byobu-2.5/bin/temp-f byobu-2.5/bin/temp-f --- byobu-2.5/bin/temp-f +++ byobu-2.5/bin/temp-f @@ -20,10 +20,18 @@ DIR="/proc/acpi/thermal_zone" + if [ "$1" = "--detail" ]; then exit 0 fi -if [ -r "$DIR/THM0/temperature" ]; then - t=$(sed "s/^[^0-9]\+//" "$DIR"/THM0/temperature | sed "s/\s.*$//" | awk '{printf "%.0f", $1 *9/5 + 32}') +for ZONE in `ls $DIR`; do + if [ -r $DIR/$ZONE/temperature ]; then + TPATH="$DIR/$ZONE/temperature" + break + fi +done + +if [ "$TPATH" ]; then + t=$(sed "s/^[^0-9]\+//" "$TPATH" | sed "s/\s.*$//" | awk '{printf "%.0f", $1 *9/5 + 32}') printf "\005{= kY}%sF\005{-} " "$t" fi diff -u byobu-2.5/bin/temp-c byobu-2.5/bin/temp-c --- byobu-2.5/bin/temp-c +++ byobu-2.5/bin/temp-c @@ -19,6 +19,7 @@ # DIR="/proc/acpi/thermal_zone" + if [ "$1" = "--detail" ]; then for i in `ls $DIR`; do echo "$i:" @@ -28,6 +29,13 @@ fi -if [ -r "$DIR/THM0/temperature" ]; then - t=$(sed "s/^[^0-9]\+//" "$DIR"/THM0/temperature | sed "s/\s.*$//") +for ZONE in `ls $DIR`; do + if [ -r $DIR/$ZONE/temperature ]; then + TPATH="$DIR/$ZONE/temperature" + break + fi +done + +if [ "$TPATH" ]; then + t=$(sed "s/^[^0-9]\+//" "$TPATH" | sed "s/\s.*$//") printf "\005{= kY}%sC\005{-} " "$t" fi diff -u byobu-2.5/debian/changelog byobu-2.5/debian/changelog --- byobu-2.5/debian/changelog +++ byobu-2.5/debian/changelog @@ -1,3 +1,10 @@ +byobu (2.5-0ubuntu1~ppa4) karmic; urgency=low + + * bin/temp-c, bin/temp-f: Added support for thermal zones other + than THM0 (LP: #38088) + + -- Steven Danna Wed, 27 May 2009 06:10:04 -0400 + byobu (2.5-0ubuntu1~ppa3) jaunty; urgency=low * bin/temp-c, bin/temp-f, byobu-config, byobu-config.1, byobu-status,