-bug 2757520 is fixed for system P: mac-adress is used as netdevice parameter for system p machines by minjun
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3577 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -357,7 +357,7 @@ sub mkinstall | ||||
|                     #special case for sles 11 | ||||
|                     if ( $os eq 'sles11' and -r "/install/$os/$arch/1/suseboot/yaboot") | ||||
|                     { | ||||
|                          copy("/install/$os/$arch/1/suseboot/yaboot", "/tftpboot/"); | ||||
|                         copy("/install/$os/$arch/1/suseboot/yaboot", "/tftpboot/"); | ||||
|                     } | ||||
|                 } | ||||
|                 $doneimgs{"$os|$arch"} = 1; | ||||
| @@ -395,17 +395,43 @@ sub mkinstall | ||||
|               . " install=http://" | ||||
|               . $ent->{nfsserver} | ||||
|               . "/install/$os/$arch/1"; | ||||
|             if ($ent->{installnic}) | ||||
|  | ||||
|             my $mgtref = $hmtab->getNodeAttribs($node, ['mgt']); | ||||
|             #special case for system P machines, which is mgted by hmc or ivm | ||||
|             #mac address is used to identify the netdevice | ||||
|             if( ($mgtref->{mgt} eq "hmc" || $mgtref->{mgt} eq "ivm") && $arch =~ /ppc/)  | ||||
|             { | ||||
|                 $kcmdline .= " netdevice=" . $ent->{installnic}; | ||||
|             } | ||||
|             elsif ($ent->{primarynic}) | ||||
|                 my $mactab = xCAT::Table->new("mac"); | ||||
|                 my $macref = $mactab->getNodeAttribs($node, ['mac']); | ||||
|  | ||||
|                 if (defined $macref->{mac})  | ||||
|                 { | ||||
|                     $kcmdline .= " netdevice=" . $macref->{mac}; | ||||
|                 } | ||||
|                 else  | ||||
|                 { | ||||
|                     $callback->( | ||||
|                         { | ||||
|                             error => ["No mac.mac for $node defined"], | ||||
|                             errorcode => [1] | ||||
|                         } | ||||
|                     ); | ||||
|                 } | ||||
|             }  | ||||
|             else  | ||||
|             { | ||||
|                 $kcmdline .= " netdevice=" . $ent->{primarynic}; | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 $kcmdline .= " netdevice=eth0"; | ||||
|                 if ($ent->{installnic}) | ||||
|                 { | ||||
|                     $kcmdline .= " netdevice=" . $ent->{installnic}; | ||||
|                 } | ||||
|                 elsif ($ent->{primarynic}) | ||||
|                 { | ||||
|                     $kcmdline .= " netdevice=" . $ent->{primarynic}; | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     $kcmdline .= " netdevice=eth0"; | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             #TODO: driver disk handling should in SLES case be a mod of the install source, nothing to see here | ||||
|   | ||||
		Reference in New Issue
	
	Block a user