bin/cpu-freq: fix cpu freq for powerpc hardware, use 2 decimals for GHz

-Dustin Kirkland <kirkland@ubuntu.com>Tue, 31 Mar 2009 05:23:13 -0500
This commit is contained in:
Dustin Kirkland 2009-03-31 05:23:48 -05:00
commit 4775bd9100
2 changed files with 5 additions and 3 deletions

View file

@ -21,9 +21,10 @@
p="cpu-freq"
grep -qs "^$p=0$" "$HOME/.screen-profiles/status" && exit 0
mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | awk -F"[:.]" '{print $2}'` || mhz=`grep -m 1 "^clock" /proc/cpuinfo | awk -F"[:.]" '{print $2}'`
if [ $mhz -ge 1000 ]; then
ghz=$(echo $mhz | awk '{ printf "%.1f", $1 / 1000 }')
ghz=$(echo $mhz | awk '{ printf "%.2f", $1 / 1000 }')
echo $ghz"GHz"
else
echo $mhz"MHz"

3
debian/changelog vendored
View file

@ -1,8 +1,9 @@
screen-profiles (1.42) unreleased; urgency=low
* added logo for Arch linux
* bin/cpu-freq: fix cpu freq for powerpc hardware, use 2 decimals for GHz
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 30 Mar 2009 10:53:48 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 31 Mar 2009 05:23:13 -0500
screen-profiles (1.41-0ubuntu1) jaunty; urgency=low