From a16709090b6756be55ff116ff344e7d2a297b522 Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 18 May 2012 02:38:09 +0000 Subject: [PATCH] For the places that open site table to read attributes, change to call xCAT::Utils->get_site_attribute instead git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12777 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCboot.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/PPCboot.pm b/perl-xCAT/xCAT/PPCboot.pm index 6237e5170..c930767aa 100644 --- a/perl-xCAT/xCAT/PPCboot.pm +++ b/perl-xCAT/xCAT/PPCboot.pm @@ -467,9 +467,12 @@ sub rnetboot { } } - my $sitetab = xCAT::Table->new('site'); - my $vcon = $sitetab->getAttribs({key => "conserverondemand"}, 'value'); - if ($vcon and $vcon->{"value"} and $vcon->{"value"} eq "yes" ) { + #my $sitetab = xCAT::Table->new('site'); + #my $vcon = $sitetab->getAttribs({key => "conserverondemand"}, 'value'); + my @vcons = xCAT::Utils->get_site_attribute("conserverondemand"); + my $vcon = $vcons[0]; + #if ($vcon and $vcon->{"value"} and $vcon->{"value"} eq "yes" ) { + if ( defined($vcon) and $vcon eq "yes" ) { $result = xCAT::PPCcli::lpar_netboot( $exp, $request->{verbose}, @@ -482,7 +485,7 @@ sub rnetboot { ######################################### $result = do_rnetboot( $request, $d, $exp, $name, $node, \%opt ); } - $sitetab->close; + #$sitetab->close; if (defined($request->{opt}->{m})) {