From 3bb94e2487614744d50004cb8c84752231649dd4 Mon Sep 17 00:00:00 2001 From: linggao Date: Mon, 21 Jan 2013 20:48:04 +0000 Subject: [PATCH] made configib ready for config one nic at a time. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14934 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/configib | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib index edb9ee41c..81fa43fdb 100755 --- a/xCAT/postscripts/configib +++ b/xCAT/postscripts/configib @@ -112,7 +112,6 @@ fi #clean up existing ib nic configrations if [ $PLTFRM == "Linux" ] then - if [ -f /etc/redhat-release ] then OS_name="redhat" @@ -131,35 +130,18 @@ then else dir="/etc/sysconfig/network-scripts" fi - `rm -f $dir/ifcfg-ib*` + for nic in `echo "$NIC_IBNICS" | tr "," "\n"` + do + `rm -f $dir/ifcfg-$nic` + done else - loop_number=`lsdev | grep "IP over Infiniband Network Interface" | wc -l` - - num=0 - while [ $num -lt $loop_number ] - do - if [ "$portnum" == "1" ]; then - `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 - else - 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` - fi - num=`expr $num + 1` + for nic in `echo "$NIC_IBNICS" | tr "," "\n"` + do + `rmdev -d -l $nic >/dev/null 2>&1` done fi - -HOST=`hostname -s` goodnics="" for nic in `echo "$NIC_IBNICS" | tr "," "\n"` do