From 5009c31d67f44d74542a3eea9ab05d9b7cba0227 Mon Sep 17 00:00:00 2001 From: Samveen Gulati Date: Tue, 24 Oct 2017 07:15:23 +0000 Subject: [PATCH] dodiscovery: get lan channel, dont use `1` (eg. `HP` uses `2`) --- xCAT-genesis-scripts/bin/dodiscovery | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-genesis-scripts/bin/dodiscovery b/xCAT-genesis-scripts/bin/dodiscovery index 809e42b64..d72d8cd85 100755 --- a/xCAT-genesis-scripts/bin/dodiscovery +++ b/xCAT-genesis-scripts/bin/dodiscovery @@ -167,15 +167,16 @@ if [ "$PLATFORM" != "unknown" ]; then echo "$PLATFORM" >> /tmp/discopacket fi -IsStatic=`ipmitool lan print 1 | grep 'IP Address Source' | grep 'Static'` +LANCHAN=$(ipmitool sol info |awk '/Payload Channel/{print $4}') +IsStatic=`ipmitool lan print $LANCHAN | grep 'IP Address Source' | grep 'Static'` if [ "$IsStatic" ]; then - BMCIPADDR=`ipmitool lan print 1 | grep 'IP Address' | grep -v 'IP Address Source' | cut -d ":" -f2 | sed 's/ //'` + BMCIPADDR=`ipmitool lan print $LANCHAN | grep 'IP Address' | grep -v 'IP Address Source' | cut -d ":" -f2 | sed 's/ //'` if [ "$BMCIPADDR" ]; then echo "$BMCIPADDR" >> /tmp/discopacket fi fi -BMCMAC=`ipmitool lan print 1 | grep 'MAC Address' | cut -d ":" -f2-7 | sed 's/ //'` +BMCMAC=`ipmitool lan print $LANCHAN | grep 'MAC Address' | cut -d ":" -f2-7 | sed 's/ //'` if [ "$BMCMAC" ]; then echo "$BMCMAC" >> /tmp/discopacket fi