More fix for SF bug #3404 configib for aix

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15442 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2013-03-08 19:49:02 +00:00
parent 15447d0398
commit 80b20c444f

View File

@ -138,20 +138,32 @@ then
`rm -f $dir/ifcfg-$nic:*` 2>&1 1>/dev/null
done
else
for nic in `echo "$NIC_IBNICS" | tr "," "\n"`
do
num=${nic##ib} #this assumes that all the nics starts with 'ib'
if [ "$portnum" == "1" ]; then
iba_num=$num
ib_adapter="iba$iba_num"
else
iba_num=`expr $num / 2`
ib_adapter="iba$iba_num"
fi
`rmdev -d -l $nic >/dev/null 2>&1`
`rmdev -d -l $ib_adapter >/dev/null 2>&1`
loop_number=`lsdev | grep "IP over Infiniband Network Interface" | wc -l`
num=0
while [ $num -lt $loop_number ]
do
if [ "$portnum" == "2" ]; then
num0=`expr $num \* 2`
num1=`expr $num0 + 1`
`rmdev -d -l ib$num0 >/dev/null 2>&1`
`rmdev -d -l ib$num1 >/dev/null 2>&1`
`rmdev -d -l ml$num >/dev/null 2>&1`
num=`expr $num + 1`
else
`rmdev -d -l ib$num >/dev/null 2>&1`
n=`expr $num % 2`
if [ $n == 1 ]
then
mlnum=`expr $num / 2`
`rmdev -d -l ml$mlnum >/dev/null 2>&1`
fi
num=`expr $num + 1`
fi
done
`rmdev -dl icm >/dev/null 2>&1`
#restart the managers
mkdev -c management -s infiniband -t icm
cfgmgr
fi