From 4a2fc2bc31453e1e534f6ee7c49f10e116a30bad Mon Sep 17 00:00:00 2001 From: lissav Date: Sat, 18 May 2013 11:12:09 +0000 Subject: [PATCH] fix defect 3512 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@16360 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCore.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DSHCore.pm b/perl-xCAT/xCAT/DSHCore.pm index 2e9353db7..0ad6e6261 100644 --- a/perl-xCAT/xCAT/DSHCore.pm +++ b/perl-xCAT/xCAT/DSHCore.pm @@ -709,8 +709,19 @@ 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::Utils->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->{data}->[0] = "Error from pping";