From ad0e9d09d4e0a69d9ec13a0189eb5cde75d00cdf Mon Sep 17 00:00:00 2001 From: linggao Date: Mon, 29 Apr 2013 20:25:27 +0000 Subject: [PATCH] fixed a defect #3543 running confignics has authority issues on statelite nfs_based cn git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16126 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/configib | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib index 6470db058..693126283 100755 --- a/xCAT/postscripts/configib +++ b/xCAT/postscripts/configib @@ -88,21 +88,26 @@ if [ $PLTFRM == "Linux" ] then if [ -f "/etc/rdma/rdma.conf" ] then - sed -i "s/SDP_LOAD=yes/SDP_LOAD=no/g" /etc/rdma/rdma.conf + TMP1=`sed "s/SDP_LOAD=yes/SDP_LOAD=no/g" /etc/rdma/rdma.conf` + echo "$TMP1" > /etc/rdma/rdma.conf elif [ -f "/etc/infiniband/openib.conf" ] then - sed -i "s/SDP_LOAD=yes/SDP_LOAD=no/g" /etc/infiniband/openib.conf + TMP1=`sed "s/SDP_LOAD=yes/SDP_LOAD=no/g" /etc/infiniband/openib.conf` + echo "$TMP1" > /etc/infiniband/openib.conf fi if [ -f "/etc/modprobe.conf" ] then - if [ "$portnum" == "1" ]; then - sed -i "/options ib_ehca nr_ports/d" /etc/modprobe.conf + if [ "$portnum" == "1" ]; then + TMP2=`sed "/options ib_ehca nr_ports/d" /etc/modprobe.conf` + echo "$TMP2" > /etc/modprobe.conf echo 'options ib_ehca nr_ports=1' >> /etc/modprobe.conf - else - sed -i "/options ib_ehca nr_ports=1/d" /etc/modprobe.conf - fi - sed -i "/options ib_ehca lock_hcalls/d" /etc/modprobe.conf + else + TMP2=`sed "/options ib_ehca nr_ports=1/d" /etc/modprobe.conf` + echo "$TMP2" > /etc/modprobe.conf + fi + TMP3=`sed "/options ib_ehca lock_hcalls/d" /etc/modprobe.conf` + echo "$TMP3" > /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 @@ -283,8 +288,10 @@ do if [ -f /etc/sysctl.conf ] then - sed -i "/net.ipv4.conf.$nic.arp_filter=1/d" /etc/sysctl.conf 2>&1 1>/dev/null - sed -i "/net.ipv4.conf.$nic.arp_ignore=1/d" /etc/sysctl.conf 2>&1 1>/dev/null + TMP1=`sed "/net.ipv4.conf.$nic.arp_filter=1/d" /etc/sysctl.conf 2>&1 1>/dev/null` + echo "$TMP1" > /etc/sysctl.conf + TMP2=`sed "/net.ipv4.conf.$nic.arp_ignore=1/d" /etc/sysctl.conf 2>&1 1>/dev/null` + echo "$TMP2" > /etc/sysctl.conf cfg="net.ipv4.conf.$nic.arp_filter=1" grep "$cfg" /etc/sysctl.conf 2>&1 1>/dev/null if [ $? -ne 0 ]