Fix vagrant cpu count on linux.
Corrects error in https://github.com/GoogleCloudPlatform/kubernetes/commit/19224deb04ea0f7b5003c9d29e9c841d7b1b6152 on linux cpus with hyperthreading (we need to pass the results of `cat /proc/cpuinfo | grep 'core id'` through uniq before counting the lines).
Also checks that we found more than 0 lines (cores) and defaults to the result of nproc in case we didn't (necessary for processors without the core id field, so far only observed on a raspberry pi).
Showing
Please
register
or
sign in
to comment