From eb96724594712c14f5060848b6f760151157bbbd Mon Sep 17 00:00:00 2001 From: mxi1 Date: Tue, 14 Apr 2009 13:51:33 +0000 Subject: [PATCH] -bug#2757520: only use mac.mac for system p; but left system x to use the old way git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3189 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/sles.pm | 36 +++++++++++++++++++--------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 71ff799ba..8cc23598a 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -408,17 +408,31 @@ sub mkinstall # $kcmdline .= " netdevice=eth0"; #} - #use mac.mac to set "netdevice=", if mac.mac exists - my $mactab = xCAT::Table->new('mac'); - (my $macref) = $mactab->getAttribs({node => $node}, mac); - if ($macref) { - $kcmdline .= " netdevice=$macref->{mac}"; - }elsif ($ent->{installnic}) { - $kcmdline .= " netdevice=" . $ent->{installnic}; - }elsif ($ent->{primarynic}) { - $kcmdline .= " netdevice=" . $ent->{primarynic}; - }else { - $kcmdline .= " netdevice=eth0"; + if ($arch eq "ppc64") { + #use mac.mac to set "netdevice=", if mac.mac exists + my $mactab = xCAT::Table->new('mac'); + (my $macref) = $mactab->getAttribs({node => $node}, mac); + if ($macref) { + $kcmdline .= " netdevice=$macref->{mac}"; + } else { + $callback->( + { + error => [ + "Unable to find the mac address for $node!" + ], + errorcode => [1] + } + ); + + } + } else { #mac.mac is not verified on system x, so it keeps the old way + 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