From 31fc76401d16e552fbfaa5d654cacc1938b191f5 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 23 Apr 2013 18:26:50 +0000 Subject: [PATCH] fix defect 3512 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16044 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCore.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DSHCore.pm b/perl-xCAT/xCAT/DSHCore.pm index e9afee21a..1ca50ba63 100644 --- a/perl-xCAT/xCAT/DSHCore.pm +++ b/perl-xCAT/xCAT/DSHCore.pm @@ -754,8 +754,20 @@ sub pping_hostnames my ($class, @hostnames) = @_; my $hostname_list = join ",", @hostnames; + # read site table, usefping attribute + # if set then run pping -f to use fping + # this fixes a broken nmap in Redhat 6.2 with ip alias (3512) + my $cmd="$::XCATROOT/bin/pping $hostname_list"; # default + my @usefping=xCAT::TableUtils->get_site_attribute("usefping"); + if ((defined($usefping[0])) && ($usefping[0] eq "1")) { + $cmd = "$::XCATROOT/bin/pping -f $hostname_list"; + } + #my $rsp={}; + #$rsp->{data}->[0] = "running command $cmd"; + #xCAT::MsgUtils->message("I", $rsp, $::CALLBACK); + my @output = - xCAT::Utils->runcmd("$::XCATROOT/bin/pping $hostname_list", -1); + xCAT::Utils->runcmd($cmd, -1); if ($::RUNCMD_RC !=0) { my $rsp={}; $rsp->{error}->[0] = "Error from pping";