2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-28 06:23:26 +00:00

dodiscovery: use information from FRU instead of DMI for MTM

Don't use information from DMI to populate the MTM field, as there is no
guarantee it will match with what's in the FRU pages. Since
`bmcdiscover` uses FRU information, use it in `dosdiscovery` too so they
will match for MTMS discovery.
This commit is contained in:
Kilian Cavalotti 2017-02-13 10:57:26 -08:00
parent 4bfdf4d908
commit c0c6082b13

View File

@ -73,14 +73,11 @@ if [ -r /sys/devices/virtual/dmi/id/product_name ]; then #x86
else
MTM=`cat /sys/devices/virtual/dmi/id/product_name|awk -F'[' '{print $2}'|awk -F']' '{print $1}'`
if [ -z "$MTM" ]; then
SYS=`cat /sys/devices/virtual/dmi/id/sys_vendor`
PRD=`cat /sys/devices/virtual/dmi/id/product_name`
if [ ! -z "$SYS" ]; then
MTM=${SYS^^}":"${PRD^^}
else
MTM=${PRD^^}
fi
fi
FRU=`ipmitool fru print 0`
if [ $? -eq 0 ]; then
MTM=`echo "$FRU" | awk -F': ' '/Product Manufacturer/ {m=$2} /Product Name/ {n=$2} END {print m":"n}'`
fi
fi
SERIAL=`cat /sys/devices/virtual/dmi/id/product_serial`
fi
CPUCOUNT=`cat /proc/cpuinfo |grep "model name"|wc -l`