• R/O
  • HTTP
  • SSH
  • HTTPS

immortalwrt: Commit

Mirror only - Please move to https://github.com/immortalwrt/immortalwrt


Commit MetaInfo

Revision53df97e7893f97a5afd91f8ee5d77979fbe890d8 (tree)
Zeit2022-01-06 23:17:34
AutorTianling Shen <cnsztl@immo...>
CommiterTianling Shen

Log Message

autocore: fix count core number

uniq doesn't work, I don't know why.

Fixes: #558

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>

Ändern Zusammenfassung

Diff

--- a/package/emortal/autocore/files/generic/cpuinfo
+++ b/package/emortal/autocore/files/generic/cpuinfo
@@ -3,7 +3,7 @@
33 cpu_arch="$(grep "model name" "/proc/cpuinfo" | head -n1 | awk -F ': ' '{print $2}' | xargs)"
44 [ -z "${cpu_arch}" ] && cpu_arch="?"
55 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"
77 else
88 cpu_cores="$(grep -c "processor" "/proc/cpuinfo")"
99 fi
Show on old repository browser