diff --git a/xCAT-server/share/xcat/ib/scripts/configiba.1port b/xCAT-server/share/xcat/ib/scripts/configiba.1port index 17663d2ab..108e4e5eb 100755 --- a/xCAT-server/share/xcat/ib/scripts/configiba.1port +++ b/xCAT-server/share/xcat/ib/scripts/configiba.1port @@ -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 @@ -22,7 +22,7 @@ then echo "Not found the driver dameon: rdma or openibd" exit fi - fi + fi else ib_driver="openibd" @@ -45,7 +45,7 @@ then sed -i "/options ib_ehca nr_ports/d" /etc/modprobe.conf sed -i "/options ib_ehca lock_hcalls/d" /etc/modprobe.conf echo 'options ib_ehca nr_ports=1' >> /etc/modprobe.conf - echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf + echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf fi /sbin/chkconfig --level 2345 $ib_driver on > /dev/null 2>&1 /sbin/service $ib_driver restart @@ -57,8 +57,8 @@ fi if [ $PLTFRM == "Linux" ] then - ib_number=`lspci | grep -iE "(InfiniBand|Mellanox)" | wc -l` - #loop_number=$[ $ib_number * 2 ] + ib_number=`lspci | grep -iE "(InfiniBand|Mellanox)" | wc -l` + #loop_number=$[ $ib_number * 2 ] loop_number=$ib_number if [ -f /etc/redhat-release ] @@ -71,7 +71,7 @@ then echo "Unsupported to config IB on this OS!" exit fi - + if [ $OS_name == 'suse' ] then dir="/etc/sysconfig/network" @@ -97,7 +97,7 @@ else fi num=`expr $num + 1` done - `rmdev -dl icm >/dev/null 2>&1` + `rmdev -dl icm >/dev/null 2>&1` mkdev -c management -s infiniband -t icm cfgmgr loop_number=`lsdev -Cc adapter |grep iba |wc -l` @@ -113,8 +113,8 @@ 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" - + nic="ib$num" + # Get hostname from system in case postscript environment is not ready if [ $NODE ] then @@ -145,7 +145,7 @@ do if [ $PLTFRM == "Linux" ] then # Issue openibd for Linux at boot time - + if [ -f /etc/sysctl.conf ] then sed -i "/net.ipv4.conf.$nic.arp_filter=1/d" /etc/sysctl.conf @@ -161,7 +161,7 @@ IPADDR=$ip NETMASK=$netmask GATEWAY=$gateway" > $dir/ifcfg-$nic if [[ "$OSVER" == rhels6* ]] - then + then echo "DEVICE=$nic BOOTPROTO=static IPADDR=$ip @@ -172,7 +172,7 @@ GATEWAY=$gateway" > $dir/ifcfg-$nic if [ $OS_name == 'redhat' ] then echo "ONBOOT=yes" >> $dir/ifcfg-$nic - else + else echo "STARTMODE=auto" >> $dir/ifcfg-$nic fi elif [ $PLTFRM == "AIX" ] @@ -199,7 +199,7 @@ 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 @@ -219,7 +219,7 @@ then # sed -i "/options ib_ehca nr_ports/d" /etc/modprobe.conf # sed -i "/options ib_ehca lock_hcalls/d" /etc/modprobe.conf # echo 'options ib_ehca nr_ports=1' >> /etc/modprobe.conf -# echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf +# echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf # fi # /sbin/chkconfig --level 2345 $ib_driver on /sbin/service $ib_driver restart @@ -235,8 +235,8 @@ then if [[ "$OSVER" == rhels6* ]] then ip link set dev ib$num up - else - ifup ib$num + else + ifup ib$num fi num=`expr $num + 1`