xcat-core/xCAT-server-2.0/share/xcat/postscripts/hardeths
jbjohnso 129af8ee3e -Use yield in child process data collection loops to avoid cycling needlessly, what was happing implicitly with sleep, the part that mattered
-Copy hardeths redundantly, still need to pick one definitive place and go with that


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@738 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2008-03-10 15:36:44 +00:00

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