From 8ed951b02dd047bea13017647a5f1a27b8787b41 Mon Sep 17 00:00:00 2001 From: Lachlan Simpson Date: Thu, 5 Mar 2020 09:36:14 +1100 Subject: [PATCH] Minor documentation fixes: spelling, grammar; configib indentation --- .../domain_name_resolution.rst | 4 +- .../network/cfg_network_extra_param.rst | 2 +- xCAT/postscripts/configib | 54 +++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst index 03eaeaad3..063be13f2 100644 --- a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst +++ b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst @@ -301,7 +301,7 @@ nicips example: :: NOTE: The management interface **(eth0)**, that the **compute02** IP is configured on, is not included in the list of additional nics. Although adding it to the list of nics would do no harm. -This **nicips** value indicates that there are two additional interfaces to be configured on node compute02,eth1 and eth2. The **eth1** interface will get the IP address **11.10.1.2**. The **eth2** interface will get two IP addresses, **"80.0.0.2" and "70.0.0.2"**. +This **nicips** value indicates that there are two additional interfaces to be configured on node compute02, eth1 and eth2. The **eth1** interface will get the IP address **11.10.1.2**. The **eth2** interface will get two IP addresses, **"80.0.0.2" and "70.0.0.2"**. nichostnamesuffixes example: :: @@ -329,7 +329,7 @@ nicnetworks example: :: chdef -t node -o compute02 nicnetworks.eth1=clstrnet11 nicnetworks.eth2='clstrnet80|clstrnet-lab' -In this example we are saying that the IP address of "eth0" (ie. compute02-eth1 -> 11.10.1.2) is part of the xCAT network named **"clstrnet11"**. **"compute02-eth2"** is in network **"clstrnet80"** and **"compute02-eth2-lab"** is in **"clstrnet-lab"**. +In this example we are saying that the IP address of **"eth1"** (ie. compute02-eth1 -> 11.10.1.2) is part of the xCAT network named **"clstrnet11"**. **"compute02-eth2"** is in network **"clstrnet80"** and **"compute02-eth2-lab"** is in **"clstrnet-lab"**. By default the xCAT code will attempt to match the interface IP to one of the xCAT network definitions. diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst index 6934cbec2..1e5adbcec 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_extra_param.rst @@ -9,7 +9,7 @@ Use ``nicextraparams`` to customize attributes in NIC configuration file. For ex chdef cn1 nicextraparams.eth1="MTU=1456 ONBOOT=no" - #. After ``confignetwork`` is executed in ``cn1``, ``nicexraparams`` will overwrite the original value in ``/etc/sysconfig/network-scripts/ifcfg-eth1`` as :: + #. After ``confignetwork`` is executed in ``cn1``, ``nicextraparams`` will overwrite the original value in ``/etc/sysconfig/network-scripts/ifcfg-eth1`` as :: DEVICE=eth1 IPADDR=13.1.89.7 diff --git a/xCAT/postscripts/configib b/xCAT/postscripts/configib index 41271ccf8..bcddc25e7 100755 --- a/xCAT/postscripts/configib +++ b/xCAT/postscripts/configib @@ -192,38 +192,38 @@ then rm -f $dir/ifcfg-$nic 2>&1 1>/dev/null done - else - interfaces="/etc/network/interfaces" + else + interfaces="/etc/network/interfaces" - for tmp in `sed -n "/auto ib/=" ${interfaces}` + for tmp in `sed -n "/auto ib/=" ${interfaces}` + do + startline=`sed -n "/auto ib/=" ${interfaces}| head -n 1` + endline=`sed -n "$startline,/^auto/p" ${interfaces} |wc -l` + + if sed -n "$startline,/^auto/p" ${interfaces} |sed '$!d' |grep "auto" >/dev/null;then + endline=`expr $startline + $endline - 2` + else + endline=`expr $startline + $endline - 1` + fi + + ((startline--)) + temp=`sed -n ${startline}p ${interfaces}` + while [[ $temp =~ ^# ]] do - startline=`sed -n "/auto ib/=" ${interfaces}| head -n 1` - endline=`sed -n "$startline,/^auto/p" ${interfaces} |wc -l` - - if sed -n "$startline,/^auto/p" ${interfaces} |sed '$!d' |grep "auto" >/dev/null;then - endline=`expr $startline + $endline - 2` - else - endline=`expr $startline + $endline - 1` - fi - ((startline--)) temp=`sed -n ${startline}p ${interfaces}` - while [[ $temp =~ ^# ]] - do - ((startline--)) - temp=`sed -n ${startline}p ${interfaces}` - done - ((startline++)) - - temp=`sed -n ${endline}p ${interfaces}` - while [[ $temp =~ ^# ]] - do - ((endline--)) - temp=`sed -n ${endline}p ${interfaces}` - done - - sed -i ${startline},${endline}d ${interfaces} done + ((startline++)) + + temp=`sed -n ${endline}p ${interfaces}` + while [[ $temp =~ ^# ]] + do + ((endline--)) + temp=`sed -n ${endline}p ${interfaces}` + done + + sed -i ${startline},${endline}d ${interfaces} + done fi else loop_number=`lsdev | grep "IP over Infiniband Network Interface" | wc -l`