From 8dd5e11774caca299c97735635327d9619cacb3b Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Mon, 31 Oct 2011 10:59:01 +0000 Subject: [PATCH] Removed the check of pping/ppping -i option when trying to remove the 'hfx' postfix in hostname, since in power 775 cluster, it is also possible to check ethernet connections with -i enx. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10929 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/pping | 7 ++----- xCAT-client/sbin/pping2 | 12 +++--------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/xCAT-client/bin/pping b/xCAT-client/bin/pping index 6e7bcaeab..fb94925ad 100755 --- a/xCAT-client/bin/pping +++ b/xCAT-client/bin/pping @@ -119,11 +119,8 @@ foreach my $interf (@interfaces) { # make a copy of the node list and add the interface on $noderef = [ @nodes ]; foreach (@$noderef) { - if ($interf =~ /hf\d$/ && /-hf\d$/) { - s/-hf\d$/-$interf/; - } else { - s/$/-$interf/; - } + s/-hf\d$//; + s/$/-$interf/; } } else { diff --git a/xCAT-client/sbin/pping2 b/xCAT-client/sbin/pping2 index e0c6743d2..92d3a0d35 100755 --- a/xCAT-client/sbin/pping2 +++ b/xCAT-client/sbin/pping2 @@ -36,15 +36,9 @@ fi nodes=`echo $1 |sed "s/,/ /g"` 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 + nodes=`echo $nodes |sed "s/-hf[0-9]//g"` + nodes=`echo $nodes |sed "s/ /-$ETH /g"` + nodes="$nodes-$ETH" fi which fping >/dev/null 2>&1