From f4a06ff3e65dd22dd4f74c83255449f1dd5d6a6b Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 23 Mar 2012 09:43:09 +0000 Subject: [PATCH] fixed 3499932 and 3499065: 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/trunk@11960 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/ib/scripts/configiba.2ports | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/ib/scripts/configiba.2ports b/xCAT-server/share/xcat/ib/scripts/configiba.2ports index bbe13ac3a..1ee071a44 100644 --- a/xCAT-server/share/xcat/ib/scripts/configiba.2ports +++ b/xCAT-server/share/xcat/ib/scripts/configiba.2ports @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -vx # IBM(c) 2008 EPL license http://www.eclipse.org/legal/epl-v10.html # Sample xCAT post script for configuring secondary adatper based on eth0 @@ -22,7 +22,6 @@ then exit fi fi - else ib_driver="openibd" fi @@ -49,10 +48,22 @@ then fi +if [ $PLTFRM == "Linux" ] +then + + ib_number=`lspci | grep -i InfiniBand | wc -l` + loop_number=$[ $ib_number * 2 ] + #loop_number=$[ $loop_number - 1 ] +else + loop_number=`lsdev -Cc adapter |grep iba |wc -l` + +fi + HOST=`hostname -s` -for num in 0 1 +#ifor num in 0 1 +for (( num=0; num<$loop_number; num++)) do # Take primary node name, add -ib$num and then reverse resolve to get what ip should be nic="ib$num" @@ -166,7 +177,8 @@ then /sbin/service $ib_driver restart - for num in 0 1 + #for num in 0 1 + for (( num=0; num<$loop_number; num++)) do sleep 5