Mirror only - Please move to https://github.com/immortalwrt/immortalwrt
Révision | 53df97e7893f97a5afd91f8ee5d77979fbe890d8 (tree) |
---|---|
l'heure | 2022-01-06 23:17:34 |
Auteur | Tianling Shen <cnsztl@immo...> |
Commiter | Tianling Shen |
autocore: fix count core number
uniq doesn't work, I don't know why.
Fixes: #558
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
@@ -3,7 +3,7 @@ | ||
3 | 3 | cpu_arch="$(grep "model name" "/proc/cpuinfo" | head -n1 | awk -F ': ' '{print $2}' | xargs)" |
4 | 4 | [ -z "${cpu_arch}" ] && cpu_arch="?" |
5 | 5 | if grep -q "x86" "/etc/openwrt_release"; then |
6 | - cpu_cores="$(grep "core id" "/proc/cpuinfo" | uniq | wc -l)C $(grep -c "processor" "/proc/cpuinfo")T" | |
6 | + cpu_cores="$(grep "core id" "/proc/cpuinfo" | sort -u | wc -l)C $(grep -c "processor" "/proc/cpuinfo")T" | |
7 | 7 | else |
8 | 8 | cpu_cores="$(grep -c "processor" "/proc/cpuinfo")" |
9 | 9 | fi |