8a629436e6
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@731 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
10 lines
570 B
Plaintext
10 lines
570 B
Plaintext
for nic in `ifconfig -a|grep -B1 "inet addr"|awk '{print $1}'|grep -v inet|grep -v -- --|grep -v lo`; do
|
|
IPADDR=`ifconfig $nic |grep "inet addr"|awk '{print $2}' |awk -F: '{print $2}'`
|
|
NETMASK=`ifconfig $nic |grep "inet addr"|awk '{print $4}' |awk -F: '{print $2}'`
|
|
sed -i s/BOOTPROTO=dhcp/BOOTPROTO=none/ /etc/sysconfig/network-scripts/ifcfg-$nic
|
|
echo IPADDR=$IPADDR >> /etc/sysconfig/network-scripts/ifcfg-$nic
|
|
echo NETMASK=$NETMASK >> /etc/sysconfig/network-scripts/ifcfg-$nic
|
|
done
|
|
sed -i "s/HOSTNAME.*/HOSTNAME=`hostname`/" /etc/sysconfig/network
|
|
|