fix bug 3502 rspconfig support for USERID=<password> for CMM in genesis case
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16003 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -4497,13 +4497,16 @@ sub clicmds {
 | 
			
		||||
  my $curraddr = $mpa;
 | 
			
		||||
  if ($args{curraddr}) {
 | 
			
		||||
	$curraddr = $args{curraddr};
 | 
			
		||||
  } elsif (defined($handled{'initnetwork'})) {
 | 
			
		||||
  } elsif (defined($handled{'initnetwork'}) or defined($handled{'USERID'})) {
 | 
			
		||||
    # get the IP of mpa from the hosts.otherinterfaces
 | 
			
		||||
    my $hoststab = xCAT::Table->new('hosts');
 | 
			
		||||
    if ($hoststab) {
 | 
			
		||||
      my $hostdata = $hoststab->getNodeAttribs($node, ['otherinterfaces']);
 | 
			
		||||
      if (!$hostdata->{'otherinterfaces'}) {
 | 
			
		||||
         return ([1,\@unhandled,"Cannot find the temporary IP from the hosts.otherinterfaces"]);
 | 
			
		||||
         if (!defined($handled{'USERID'})) {
 | 
			
		||||
             push @cfgtext, "Cannot find the temporary IP from the hosts.otherinterfaces";
 | 
			
		||||
             return ([1,\@unhandled,""]);
 | 
			
		||||
         }
 | 
			
		||||
      } else {
 | 
			
		||||
      	$curraddr = $hostdata->{'otherinterfaces'};
 | 
			
		||||
      }
 | 
			
		||||
@@ -4638,6 +4641,14 @@ sub clicmds {
 | 
			
		||||
    }
 | 
			
		||||
    if (!defined($result)) {next;}
 | 
			
		||||
    push @data, "$_: @$result";
 | 
			
		||||
    if (/^initnetwork$/) {
 | 
			
		||||
        if (!@$result[0]) {
 | 
			
		||||
            my $hoststab = xCAT::Table->new('hosts');
 | 
			
		||||
            if ($hoststab)  {
 | 
			
		||||
                $hoststab->setNodeAttribs($mpa, {otherinterfaces=>''});
 | 
			
		||||
            }       
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    $Rc |= shift(@$result);
 | 
			
		||||
    push @cfgtext,@$result;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user