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@12887 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
9dac448093
commit
dab53851c9
@ -175,13 +175,15 @@ sub preprocess_request
|
||||
if ($nodes) {
|
||||
my $usenmapfrommn=0;
|
||||
if (-x '/usr/bin/nmap' or -x '/usr/local/bin/nmap') {
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
if ($sitetab) {
|
||||
(my $ref) = $sitetab->getAttribs({key => 'useNmapfromMN'}, 'value');
|
||||
if ($ref) {
|
||||
if ($ref->{value} =~ /1|yes|YES|Y|y/) { $usenmapfrommn=1; }
|
||||
#my $sitetab = xCAT::Table->new('site');
|
||||
#if ($sitetab) {
|
||||
#(my $ref) = $sitetab->getAttribs({key => 'useNmapfromMN'}, 'value');
|
||||
my @entries = xCAT::Utils->get_site_attribute("useNmapfromMN");
|
||||
my $t_entry = $entries[0];
|
||||
if (defined($t_entry)) {
|
||||
if ($t_entry =~ /1|yes|YES|Y|y/) { $usenmapfrommn=1; }
|
||||
}
|
||||
}
|
||||
#}
|
||||
}
|
||||
|
||||
#get monsettings
|
||||
|
Loading…
x
Reference in New Issue
Block a user