From 088ee8e9cdc514cb5475683a5dd3b67d863aa8e8 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Wed, 10 Sep 2014 01:51:06 -0700 Subject: [PATCH] add an attribute for findme used to check it is running powerNV model --- xCAT-genesis-scripts/bin/dodiscovery | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-genesis-scripts/bin/dodiscovery b/xCAT-genesis-scripts/bin/dodiscovery index 426b5bb4f..3c3929dd8 100755 --- a/xCAT-genesis-scripts/bin/dodiscovery +++ b/xCAT-genesis-scripts/bin/dodiscovery @@ -58,6 +58,7 @@ MTM=unknown SERIAL=unknown ARCH=unknown ARCH=`uname -m` #32-bit only is old news +PLATFORM=unknown if [ -r /sys/devices/virtual/dmi/id/product_name ]; then #x86 PRODNAME=`cat /sys/devices/virtual/dmi/id/product_name` IAMAVM=0 @@ -82,6 +83,7 @@ elif [ -r /proc/device-tree/model ]; then #POWER #MTM=`cat /proc/device-tree/model |awk -F, '{print $2}'` MTM=`cat /proc/device-tree/model | sed -e 's/\^.*,//'` CPUCOUNT=`cat /proc/cpuinfo |grep -e "^cpu\s*:"|wc -l` + PLATFORM=`cat /proc/cpuinfo | grep -e "^platform\s*:" | awk '{print \$3}'` grep -e "^cpu\s*:" /proc/cpuinfo | while read line; do #to avoid pulling in tail, we do a goofy thing echo $line > /tmp/cpumod done @@ -127,6 +129,9 @@ fi if [ "$SERIAL" != "unknown" ]; then echo "$SERIAL" >> /tmp/discopacket fi +if [ "$PLATFORM" != "unknown" ]; then + echo "$PLATFORM" >> /tmp/discopacket +fi #so we have some cases where DMI table explictly records every function number, and some where only first function is enumerated #so for each onboard device, we record it. If it is also the first function, we'll seek out other function numbers and append #if that other function number does not show up in its own dmi type 41 record