From 2d550820b2fea805f4d62fcb7bd7127a47f73248 Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 18 May 2012 03:15:00 +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@12782 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/InstUtils.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/InstUtils.pm b/perl-xCAT/xCAT/InstUtils.pm index 0049efc6a..f0ca93af8 100644 --- a/perl-xCAT/xCAT/InstUtils.pm +++ b/perl-xCAT/xCAT/InstUtils.pm @@ -72,11 +72,13 @@ sub getnimprime # or it is the xCAT management node. my $nimprime = xCAT::Utils->get_site_Master(); - my $sitetab = xCAT::Table->new('site'); - (my $et) = $sitetab->getAttribs({key => "nimprime"}, 'value'); - if ($et and $et->{value}) + #my $sitetab = xCAT::Table->new('site'); + #(my $et) = $sitetab->getAttribs({key => "nimprime"}, 'value'); + my @nimprimes = xCAT::Utils->get_site_attribute("nimprime"); + my $tmp = $nimprimes[0]; + if (defined($tmp)) { - $nimprime = $et->{value}; + $nimprime = $tmp; } my $hostname;