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