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@12787 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
245a7a055b
commit
59ac4c2b1b
@ -70,11 +70,13 @@ sub subvars {
|
||||
}
|
||||
close($inh);
|
||||
my $master;
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
my $noderestab = xCAT::Table->new('noderes');
|
||||
(my $et) = $sitetab->getAttribs({key=>"master"},'value');
|
||||
if ($et and $et->{value}) {
|
||||
$master = $et->{value};
|
||||
#my $sitetab = xCAT::Table->new('site');
|
||||
#my $noderestab = xCAT::Table->new('noderes');
|
||||
#(my $et) = $sitetab->getAttribs({key=>"master"},'value');
|
||||
my @masters = xCAT::Utils->get_site_attribute("master");
|
||||
my $tmp = $masters[0]
|
||||
if ( defined($tmp) ) {
|
||||
$master = $tmp;
|
||||
}
|
||||
my $ipfn = xCAT::Utils->my_ip_facing($node);
|
||||
if ($ipfn) {
|
||||
@ -208,16 +210,17 @@ sub machinepassword {
|
||||
$ou = $ouent->{ou};
|
||||
}
|
||||
}
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
unless ($sitetab) {
|
||||
return "ERROR: unable to open site table";
|
||||
}
|
||||
#my $sitetab = xCAT::Table->new('site');
|
||||
#unless ($sitetab) {
|
||||
# return "ERROR: unable to open site table";
|
||||
#}
|
||||
my $domain;
|
||||
(my $et) = $sitetab->getAttribs({key=>"domain"},'value');
|
||||
if ($et and $et->{value}) {
|
||||
$domain = $et->{value};
|
||||
}
|
||||
unless ($domain) {
|
||||
#(my $et) = $sitetab->getAttribs({key=>"domain"},'value');
|
||||
my @domains = xCAT::Utils->get_site_attribute("domain");
|
||||
my $tmp = $domains[0];
|
||||
if (defined($tmp)) {
|
||||
$domain = $tmp;
|
||||
} else {
|
||||
return "ERROR: no domain set in site table";
|
||||
}
|
||||
my $realm = uc($domain);
|
||||
@ -237,9 +240,12 @@ sub machinepassword {
|
||||
}
|
||||
$loggedrealms{$realm}=1;
|
||||
}
|
||||
my $server = $sitetab->getAttribs({key=>'directoryserver'},['value']);
|
||||
if ($server and $server->{value}) {
|
||||
$server = $server->{value};
|
||||
#my $server = $sitetab->getAttribs({key=>'directoryserver'},['value']);
|
||||
my $server;
|
||||
my @servers = xCAT::Utils->get_site_attribute("directoryserver");
|
||||
$tmp = $servers[0];
|
||||
if (defined($tmp)) {
|
||||
$server = $tmp;
|
||||
} else {
|
||||
$server = '';
|
||||
if ($netdnssupport) {
|
||||
|
Loading…
Reference in New Issue
Block a user