From 09369ca2eba40f7aa50bdd31c491e2e78e6f4b6e Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Sun, 30 Oct 2011 09:03:17 +0000 Subject: [PATCH] Make ppping -i option support hfi interfaces git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10924 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/sbin/pping2 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xCAT-client/sbin/pping2 b/xCAT-client/sbin/pping2 index ebcdb7202..e0c6743d2 100755 --- a/xCAT-client/sbin/pping2 +++ b/xCAT-client/sbin/pping2 @@ -35,9 +35,16 @@ then fi nodes=`echo $1 |sed "s/,/ /g"` -if [ -n "$ETH" ]; then - nodes=`echo $nodes |sed "s/ /-$ETH /g"` - nodes="$nodes-$ETH" +if [ -n "$ETH" ]; then + if echo $ETH | grep hf + then + nodes=`echo $nodes |sed "s/-hf[0-9]//g"` + nodes=`echo $nodes |sed "s/ /-$ETH /g"` + nodes="$nodes-$ETH" + else + nodes=`echo $nodes |sed "s/ /-$ETH /g"` + nodes="$nodes-$ETH" + fi fi which fping >/dev/null 2>&1