2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Send MTM in documulusdiscovery to support MTMS discovery (#3742)

This commit is contained in:
Matt Ezell 2017-08-22 22:28:47 -04:00 committed by yangsong
parent 9ca74e38fc
commit e58dc0674f

View File

@ -43,6 +43,7 @@ logger -s -t $log_label -p local4.info "Beginning switch discovery process..."
#grab the switch information
dmidweinfo=$(/usr/sbin/dmidecode 2>/dev/null)
PRODUCTNAME=$(echo "$dmidweinfo"|grep "Product Name"|cut -d: -f2|sed -e 's/^\s*//' -e 's/\s*$//')
VENDOR=$(echo "$dmidweinfo"|grep "Manufacturer"|cut -d: -f2|sed -e 's/^\s*//' -e 's/\s*$//')
MTM=$PRODUCTNAME
ARCH=$(uname -m)
SERIAL=$(echo "$dmidweinfo"|grep "Serial Number"|cut -d: -f2|sed -e 's/^\s*//' -e 's/\s*$//')
@ -54,7 +55,8 @@ echo "<sequential>1</sequential>" >> /tmp/discopacket
echo "<nodetype>switch</nodetype>" >> /tmp/discopacket
echo "<arch>$ARCH</arch>" >> /tmp/discopacket
#echo "<switchtype>$MTM</switchtype>" >> /tmp/discopacket
echo "<vendor>$MTM</vendor>" >> /tmp/discopacket
echo "<vendor>$VENDOR</vendor>" >> /tmp/discopacket
echo "<mtm>$MTM</mtm>" >> /tmp/discopacket
echo "<serial>$SERIAL</serial>" >> /tmp/discopacket
MAC_OF_FIRST_UP_NIC=$(ip addr show eth0|grep "link/ether"|awk -F' ' '{print $2}')