From 16716de4814947a7c61e6c5f5b4d8a2c3a7c47ec Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 14 Sep 2012 02:58:34 +0000 Subject: [PATCH] set site.nodestatus as a environment variable {NODESTATUS} git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13793 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/Template.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index dd59e35f8..cc7a47770 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -94,6 +94,12 @@ sub subvars { } $ENV{XCATMASTER}=$master; + my @nodestatus = xCAT::TableUtils->get_site_attribute("nodestatus"); + my $tmp=$nodestatus[0]; + if( defined($tmp) ){ + $ENV{NODESTATUS}=$tmp; + } + #replace the env with the right value so that correct include files can be found $inc =~ s/#ENV:([^#]+)#/envvar($1)/eg;