From db72eff8d5cb88dda9a4d038e1c869c189708cd2 Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 23 Feb 2010 11:26:19 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/DSHCore.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/DSHCore.pm b/perl-xCAT/xCAT/DSHCore.pm index 77e13d8e9..2e9353db7 100644 --- a/perl-xCAT/xCAT/DSHCore.pm +++ b/perl-xCAT/xCAT/DSHCore.pm @@ -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";