From 086ddbb9b393ec687da468bfe0a4701cc87a87dd Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 22 May 2012 03:01:25 +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@12855 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/boottarget.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/boottarget.pm b/xCAT-server/lib/xcat/plugins/boottarget.pm index 62def8f64..0748adcfc 100644 --- a/xCAT-server/lib/xcat/plugins/boottarget.pm +++ b/xCAT-server/lib/xcat/plugins/boottarget.pm @@ -43,12 +43,13 @@ sub preprocess_request return [$req]; } - my $stab = xCAT::Table->new('site'); - my $sent; - ($sent) = $stab->getAttribs({key => 'sharedtftp'}, 'value'); - unless ( $sent - and defined($sent->{value}) - and ($sent->{value} =~ /no/i or $sent->{value} =~ /0/)) + #my $stab = xCAT::Table->new('site'); + #my $sent; + #($sent) = $stab->getAttribs({key => 'sharedtftp'}, 'value'); + my @entries = xCAT::Utils->get_site_attribute("sharedtftp"); + my $site_entry = $entries[0]; + unless ( defined($site_entry) + and ( $site_entry =~ /no/i or $site_entry =~ /0/)) { #unless requesting no sharedtftp, don't make hierarchical call