Shave off an unneeded database call
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12634 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -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)) | ||||
|             { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user