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
This commit is contained in:
wanghuaz 2009-07-14 13:22:46 +00:00
parent 9e54348c3e
commit a112a89192

View File

@ -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 ) {