mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
Update kvm-probes.d/cpu.sh to deal with PowerPC CPUs (/proc/cpuinfo)
This commit is contained in:
1 parent
2432337eda
commit
8ab7de56c0
1 file changed
+13
-3
@@ -16,10 +16,20 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
MODEL=''
|
||||
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
for NAME in 'model name' 'cpu'; do
|
||||
MODEL=$(grep -m1 "^${NAME}[[:space:]]*:" /proc/cpuinfo | \
|
||||
cut -d: -f2 | \
|
||||
sed -e 's/^ *//')
|
||||
|
||||
echo -n "MODELNAME=\""
|
||||
grep -m 1 "model name" /proc/cpuinfo | cut -d: -f2 | sed -e 's/^ *//' | sed -e 's/$/"/'
|
||||
|
||||
if [ -n "${MODEL}" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "${MODEL}" ]; then
|
||||
echo "MODELNAME=\"${MODEL}\""
|
||||
fi
|
||||
Reference in new issue
Block a user