autocore: logic improvements

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
CN_SZTL 2021-02-07 01:32:40 +08:00
parent 9d29451fe9
commit f0d796aa5b
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -13,8 +13,7 @@ elif grep -q "mvebu" "/etc/openwrt_release"; then
elif [ -e "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq" ]; then
cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq") / 1000)MHz"
elif [ -e "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq" ]; then
big_cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq") / 1000)"
[ -n "${big_cpu_freq}" ] && big_cpu_freq="${big_cpu_freq}MHz "
big_cpu_freq="$(expr $(cat "/sys/devices/system/cpu/cpufreq/policy4/cpuinfo_cur_freq") / 1000)MHz "
fi
if grep -q "bcm27xx" "/etc/openwrt_release"; then