From e819e0c23e1fc51c81ef896971d81cb9b0764776 Mon Sep 17 00:00:00 2001 From: jjhua Date: Wed, 23 May 2012 06:02:23 +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@12892 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/tabutils.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/tabutils.pm b/xCAT-server/lib/xcat/plugins/tabutils.pm index 91abc85e1..7da9ed9e6 100644 --- a/xCAT-server/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server/lib/xcat/plugins/tabutils.pm @@ -298,9 +298,11 @@ sub noderm } if (!$nodes) { $noderm_usage->(1); return; } - my $sitetab = xCAT::Table->new('site'); - my $pdhcp = $sitetab->getAttribs({key=>'pruneservices'},['value']); - if ($pdhcp and $pdhcp->{value} and $pdhcp->{value} !~ /n(\z|o)/i) { + #my $sitetab = xCAT::Table->new('site'); + #my $pdhcp = $sitetab->getAttribs({key=>'pruneservices'},['value']); + my @entries = xCAT::Utils->get_site_attribute("pruneservices"); + my $t_entry = $entries[0]; + if ( defined($t_entry) and $t_entry !~ /n(\z|o)/i) { $requestcommand->({command=>['makedhcp'],node=>$nodes,arg=>['-d']}); }