Support per-node product keys, defaulting to 'os key' if nothing specified
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15817 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -471,7 +471,18 @@ sub get_win_prodkey { | ||||
| 	my $keytab = xCAT::Table->new("prodkey",-create=>0); | ||||
| 	my $keyent; | ||||
| 	if ($keytab) { | ||||
| 	   $keyent = $keytab->getAttribs({product=>$osvariant},"key"); | ||||
| 	   my @keyents = $keytab->getNodeAttribs($node,[qw/product key/]); | ||||
| 	   foreach my $tkey (@keyents) { | ||||
| 		if ($tkey->{product} eq $osvariant) { | ||||
| 		     $keyent = $tkey; | ||||
| 		     last; | ||||
| 		} elsif (not $tkey->{product}) { | ||||
| 		     $keyent = $tkey; | ||||
| 		} | ||||
| 	   } | ||||
| 	   unless ($keyent) { | ||||
| 		$keyent = $keytab->getAttribs({product=>$osvariant},"key"); | ||||
| 	   } | ||||
| 	} | ||||
| 	if ($keyent) {  | ||||
| 		return "<ProductKey><WillShowUI>OnError</WillShowUI><Key>".$keyent->{key}."</Key></ProductKey>"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user