mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 12:20:40 +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:
@ -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`
|
||||
|
Reference in New Issue
Block a user