From 0ce8e7cc6dd506b4f0a3582828daac5ed4afd898 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Wed, 2 Feb 2011 14:47:16 +0000 Subject: [PATCH] Added postscript confighfi to configure HFI interfaces git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8785 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/confighfi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 xCAT/postscripts/confighfi diff --git a/xCAT/postscripts/confighfi b/xCAT/postscripts/confighfi new file mode 100644 index 000000000..c404ee35b --- /dev/null +++ b/xCAT/postscripts/confighfi @@ -0,0 +1,21 @@ +#!/bin/sh + +for ((i=0;i<4;i++)) +do +CLIENT_IP=`ping -c 3 $NODE-hf$i | grep "data" | sed 's/.* (\([0-9.]*\)).*/\1/' || + uniq 2>&1` + +if [ -n $CLIENT_IP ] +then +echo "DEVICE=hf$i +NM_CONTROLLED=yes +IPADDR=$CLIENT_IP +NETMASK=255.0.0.0 +ONBOOT=yes +" >/etc/sysconfig/network-scripts/ifcfg-hf$i + +ifup hf$i + +sleep 1 +fi +done