From 16be33214ade10ca2af9df11aaaa7fd314c2f41b Mon Sep 17 00:00:00 2001 From: jjhua Date: Wed, 23 May 2012 05:57:41 +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@12891 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/statelite.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index d90482715..5675ca95c 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -34,13 +34,15 @@ sub process_request { my $callback = shift; my $doreq = shift; - my $sitetab = xCAT::Table->new('site'); - my $ent = $sitetab->getAttribs({key=>'installdir'},['value']); + #my $sitetab = xCAT::Table->new('site'); + #my $ent = $sitetab->getAttribs({key=>'installdir'},['value']); + my @entries = xCAT::Utils->get_site_attribute("installdir"); + my $t_entry = $entries[0]; my $installroot = "/install"; # get /install directory - if ($ent and $ent->{value}) { - $installroot = $ent->{value}; + if ( defined($t_entry) ) { + $installroot = $t_entry; } # if not defined, error out... or should we set it as default? unless ($installroot) {