From a112a89192e278b2194e223e71b621006720acca Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 14 Jul 2009 13:22:46 +0000 Subject: [PATCH] fixed one getmac issue for linux git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3775 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 386e6deb3..13de70c85 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -284,9 +284,14 @@ sub process_command { my $unreachable_nodes; my $noderange = join (',', @$nodes); my @output = xCAT::Utils->runcmd("pping $noderange", -1); + foreach my $line (@output) { my ($hostname, $result) = split ':', $line; - $node->{$hostname}->{reachable} = 1; + my ($token, $status) = split ' ', $result; + chomp($token); + if ($token eq 'ping') { + $node->{$hostname}->{reachable} = 1; + } } foreach ( @$nodes ) {