Fix cpu speed on CentOS

This commit is contained in:
Dylan 2016-01-21 00:41:15 +11:00
parent db26756ea7
commit 19b4861e83

4
fetch
View file

@ -38,7 +38,7 @@ export LANGUAGE=C
# "echo: Custom string to print" # "echo: Custom string to print"
# #
# Optional info lines that are disabled by default are: # Optional info lines that are disabled by default are:
# "getresolution" "getsong" "getvisualstyle" # "getresolution" "getsong" "getvisualstyle" "getgpu"
# #
# Info lines enabled by default are: # Info lines enabled by default are:
# "gettitle" "getdistro" "getkernel" "getuptime" "getpackages" # "gettitle" "getdistro" "getkernel" "getuptime" "getpackages"
@ -554,7 +554,7 @@ getcpu () {
# Get cpu speed # Get cpu speed
case "$distro" in case "$distro" in
*"buntu"*) *"buntu"* | "CentOS"*)
speed=$(awk -F ': ' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo) speed=$(awk -F ': ' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)
speed=${speed/\./} speed=${speed/\./}
;; ;;