From 11d16ebf55c40e9006a5fb26d328bc43fa165d1e Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 23 Feb 2010 11:32:26 +0000 Subject: [PATCH] fix for bug 2946441: use $::XCATROOT instead of hardcoded /opt/xcat git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5262 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/SINV.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/SINV.pm b/perl-xCAT/xCAT/SINV.pm index e544b26f4..c9d85bbe4 100644 --- a/perl-xCAT/xCAT/SINV.pm +++ b/perl-xCAT/xCAT/SINV.pm @@ -16,6 +16,10 @@ the sinv command. #------------------------------------------------------------------------------ package xCAT::SINV; +BEGIN +{ + $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; +} use strict; use xCAT::MsgUtils; use xCAT::NodeRange; @@ -1476,7 +1480,7 @@ sub storeresults xCAT::MsgUtils->message("E", $rsp, $callback); return 1; } - my $cmd = " /opt/xcat/sbin/xdshcoll <$newtempfile |"; + my $cmd = " $::XCATROOT/sbin/xdshcoll <$newtempfile |"; open(XCOLL, "$cmd"); if ($? > 0)