From 1d11f8e79bf8b896b70f21f001c0d9422c9efa2c Mon Sep 17 00:00:00 2001 From: mxi1 Date: Wed, 8 Dec 2010 08:31:28 +0000 Subject: [PATCH] if primarynic=mac, "netdev=" or "BOOTIF=" should be used. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8354 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 00951be86..6294275ae 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -538,13 +538,14 @@ sub mknetboot # which is used for dracut # the redhat5.x os will ignore it my $useifname=0; + if ($reshash->{$node}->[0] and $reshash->{$node}->[0]->{installnic} and $reshash->{$node}->[0]->{installnic} ne "mac") { $useifname=1; $kcmdline .= "ifname=".$reshash->{$node}->[0]->{installnic} . ":"; } elsif ($nodebootif) { $useifname=1; $kcmdline .= "ifname=$nodebootif:"; - } elsif ($reshash->{$node}->[0] and $reshash->{$node}->[0]->{primarynic}) { + } elsif ($reshash->{$node}->[0] and $reshash->{$node}->[0]->{primarynic} and $reshash->{$node}->[0]->{primarynic} ne "mac") { $useifname=1; $kcmdline .= "ifname=".$reshash->{$node}->[0]->{primarynic}.":"; } @@ -579,7 +580,7 @@ sub mknetboot $kcmdline .= "netdev=" . $reshash->{$node}->[0]->{installnic} . " "; } elsif ($nodebootif) { $kcmdline .= "netdev=" . $nodebootif . " "; - } elsif ( $reshash->{$node}->[0] and $reshash->{$node}->[0]->{primarynic}) { + } elsif ( $reshash->{$node}->[0] and $reshash->{$node}->[0]->{primarynic} and $reshash->{$node}->[0]->{primarynic} ne "mac") { $kcmdline .= "netdev=" . $reshash->{$node}->[0]->{primarynic} . " "; } else { if ($mac) {