give precedence to "Hardware" entry in /proc/cpuinfo

This commit is contained in:
Ciriaco Garcia de Celis 2019-04-26 01:47:05 +02:00
parent cc78503b58
commit c5f3f7626a

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