Shave off an unneeded database call
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12633 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
710fd4029b
commit
d3e17f1988
@ -6309,12 +6309,18 @@ sub enablessh
|
||||
{
|
||||
|
||||
# if not a service node we need to check, before enabling
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
my $attr = "sshbetweennodes";
|
||||
my $ref = $sitetab->getAttribs({key => $attr}, 'value');
|
||||
if ($ref)
|
||||
{
|
||||
my $values = $ref->{value};
|
||||
my $values;
|
||||
if (keys %::XCATSITEVALS) {
|
||||
$values=$::XCATSITEVALS{sshbetweennodes};
|
||||
} else {
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
my $attr = "sshbetweennodes";
|
||||
my $ref = $sitetab->getAttribs({key => $attr}, 'value');
|
||||
if ($ref) {
|
||||
$values = $ref->{value};
|
||||
}
|
||||
}
|
||||
if ($values) {
|
||||
my @groups = split(/,/, $values);
|
||||
if (grep(/^ALLGROUPS$/, @groups))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user