For AIX, remove the original ib configuration; use the loop number instead of 0, 1, 2...
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12011 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8aef3e9e81
commit
6a4febe201
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh
|
||||
# IBM(c) 2008 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
# Sample xCAT post script for configuring secondary adatper based on eth0
|
||||
@ -80,6 +80,19 @@ then
|
||||
fi
|
||||
`rm -f $dir/ifcfg-ib*`
|
||||
else
|
||||
|
||||
loop_number=`lsdev | grep "IP over Infiniband Network Interface" | wc -l`
|
||||
|
||||
num=0
|
||||
#for (( num = 0; num < loop_number; num++ ))
|
||||
while [ $num -lt $loop_number ]
|
||||
do
|
||||
num1=`expr $num % 2`
|
||||
`rmdev -d -l ib$num`
|
||||
`rmdev -d -l ml$num1`
|
||||
num=`expr $num + 1`
|
||||
done
|
||||
|
||||
loop_number=`lsdev -Cc adapter |grep iba |wc -l`
|
||||
|
||||
fi
|
||||
@ -89,7 +102,8 @@ fi
|
||||
HOST=`hostname -s`
|
||||
|
||||
#for num in 0 1
|
||||
for (( num=0; num<$loop_number; num++))
|
||||
num=0
|
||||
while [ $num -lt $loop_number ]
|
||||
do
|
||||
# Take primary node name, add -ib$num and then reverse resolve to get what ip should be
|
||||
nic="ib$num"
|
||||
@ -175,6 +189,8 @@ GATEWAY=$gateway" > $dir/ifcfg-$nic
|
||||
mkiba -a $ip -i $nic -A $ib_adapter -p $port -P -1 -S up -m $netmask
|
||||
fi
|
||||
fi
|
||||
|
||||
num=`expr $num + 1`
|
||||
done
|
||||
|
||||
# Bringup all the ib interfaces
|
||||
@ -202,7 +218,7 @@ then
|
||||
sleep 10
|
||||
|
||||
#for num in 0 1
|
||||
for (( num=0; num<$loop_number; num++))
|
||||
while [ $num -lt $loop_number ]
|
||||
do
|
||||
sleep 5
|
||||
#ifup ib$num
|
||||
@ -213,6 +229,7 @@ then
|
||||
ifup ib$num
|
||||
fi
|
||||
|
||||
num=`expr $num + 1`
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user