From 57518648b94b4308a8c390120f90ac97acbc9343 Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 12 Apr 2012 02:58:46 +0000 Subject: [PATCH] add initialization of environment variable XCATROOT git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12206 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index e89a807d7..4f4be37e0 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -9,6 +9,13 @@ use File::Path; #use Data::Dumper; use Sys::Syslog; use xCAT::ADUtils; #to allow setting of one-time machine passwords + +BEGIN +{ + $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; +} + + my $netdnssupport = eval { require Net::DNS; 1;