Commit f4b266b5 authored by Dylan Araps's avatar Dylan Araps

CPU Speed: Don't use read

parent 8c93c3b6
......@@ -702,8 +702,8 @@ getcpu() {
esac
# Fallback to cpuinfo_max_freq if $speed_type fails
read -t 1 -r speed < "${speed_dir}/${speed_type}" || \
read -t 1 -r speed < "${speed_dir}/cpuinfo_max_freq"
speed="$(< "${speed_dir}/${speed_type}")" || \
speed="$(< "${speed_dir}/cpuinfo_max_freq")"
speed="$((speed / 100000))"
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment