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:
jbjohnso 2012-05-11 14:54:14 +00:00
parent 710fd4029b
commit d3e17f1988

View File

@ -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))
{