fix for bug 2946475: use $::XCATROOT instead of hardcoded /opt/xcat

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5261 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
ligc 2010-02-23 11:26:19 +00:00
parent 57578f9f08
commit db72eff8d5

View File

@ -3,6 +3,10 @@
package xCAT::DSHCore;
BEGIN
{
$::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr';
}
use locale;
use strict;
use Socket;
@ -706,7 +710,7 @@ sub pping_hostnames
my $hostname_list = join ",", @hostnames;
my @output =
xCAT::Utils->runcmd("/opt/xcat/bin/pping $hostname_list", -1);
xCAT::Utils->runcmd("$::XCATROOT/bin/pping $hostname_list", -1);
if ($::RUNCMD_RC !=0) {
my $rsp={};
$rsp->{data}->[0] = "Error from pping";