From e213cb0f1cebe23a8e1c9f3beefb6c13d439b1b2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 3 May 2010 20:37:39 +0000 Subject: [PATCH] -On x86, have a BOOTIF= variable available, and default to using it where possible git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5947 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 2 +- xCAT-server/lib/xcat/plugins/pxe.pm | 1 + xCAT-server/lib/xcat/plugins/sles.pm | 6 ++++-- xCAT-server/lib/xcat/plugins/xnba.pm | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 4a0ca4720..f8503a610 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -837,7 +837,7 @@ sub mkinstall } else { - $ksdev = "eth0"; + $ksdev = "bootif"; #if not specified, fall back to bootif } if ($ksdev eq "") { diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index 9ca25d440..3184e8ce4 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -169,6 +169,7 @@ sub setstate { } else { print $pcfg "\n"; } + print $pcfg " IPAPPEND 2\n"; } close($pcfg); my $inetn = inet_aton($node); diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index f5de1ef3d..ca9cc5a43 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -698,7 +698,7 @@ sub mkinstall } else { - $netdev = "eth0"; + $netdev = "bootif"; } if ($netdev eq "") #why it is blank, no mac defined? { @@ -709,7 +709,9 @@ sub mkinstall } ); } - $kcmdline .= " netdevice=" . $netdev; + unless ($netdev eq "bootif") { #if going by bootif, BOOTIF will suffice + $kcmdline .= " netdevice=" . $netdev; + } } #TODO: driver disk handling should in SLES case be a mod of the install source, nothing to see here diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index f28c25e4e..e3f922ecc 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -198,11 +198,14 @@ sub setstate { } else { print $pcfg "\n"; } + print $pcfg "IPAPPEND 2\n"; } else { #other than comboot/multiboot, we won't have need of pxelinux print $pcfg "imgfetch -n kernel http://".'${next-server}/tftpboot/'.$kern->{kernel}."\n"; print $pcfg "imgload kernel\n"; if ($kern->{kcmdline}) { - print $pcfg "imgargs kernel ".$kern->{kcmdline}."\n"; + print $pcfg "imgargs kernel ".$kern->{kcmdline}." BOOTIF=${netX/mac}\n"; + } else { + print $pcfg "imgargs kernel BOOTIF=${netX/mac}\n"; } if ($kern->{initrd}) { print $pcfg "imgfetch http://".'${next-server}'."/tftpboot/".$kern->{initrd}."\n";