Merge pull request #1240 from lightful/pr_cpuinfo

give precedence to "Hardware" entry in /proc/cpuinfo
This commit is contained in:
black 2019-04-30 11:50:29 +03:00 committed by GitHub
commit 0b266c0e7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1816,9 +1816,9 @@ get_cpu() {
;;
*)
cpu="$(awk -F ': | @' \
cpu="$(awk -F '\\s*: | @' \
'/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {
printf $2; exit}' "$cpu_file")"
cpu=$2; if ($1 == "Hardware") exit } END { print cpu }' "$cpu_file")"
;;
esac