mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
MTM: add support for other vendors, in the form of vendor::model
This commit is contained in:
parent
48af0de2b9
commit
603c7785f7
@ -72,6 +72,15 @@ if [ -r /sys/devices/virtual/dmi/id/product_name ]; then #x86
|
||||
MTM=VMware
|
||||
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
|
||||
SERIAL=`cat /sys/devices/virtual/dmi/id/product_serial`
|
||||
fi
|
||||
CPUCOUNT=`cat /proc/cpuinfo |grep "model name"|wc -l`
|
||||
|
@ -921,6 +921,13 @@ sub bmcdiscovery_ipmi {
|
||||
$serial = $2;
|
||||
last;
|
||||
}
|
||||
|
||||
if (($fru_output =~ /Product Manufacturer\s+:\s+(.*?)\s+P.*?roduct Name\s+:\s+(.*?)\s+P.*?roduct Serial\s+:\s+(\S+)/)) {
|
||||
$mtm = $1.":".$2;
|
||||
$serial = $3;
|
||||
last;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user