From d33eb736f1497934179a37ec82f484ff72fe4b33 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 28 Sep 2009 14:07:42 +0000 Subject: [PATCH] -Update dhcp plugin to properly do pxe when not xnba git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4248 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 959702903..e5073dbda 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -266,7 +266,7 @@ sub addnode $lstatements = 'option root-path \"'.$iscsirootpath.'\";'.$lstatements; } } - if ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'pxe' and $lstatements !~ /filename/) { + if ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'xnba' and $lstatements !~ /filename/) { if (-f "$tftpdir/xcat/xnba.kpxe") { if ($doiscsi and $chainent and $chainent->{currstate} and ($chainent->{currstate} eq 'iscsiboot' or $chainent->{currstate} eq 'boot')) { $lstatements = 'if exists gpxe.bus-id { filename = \"\"; } else if exists client-architecture { filename = \"xcat/xnba.kpxe\"; } '.$lstatements; @@ -274,6 +274,14 @@ sub addnode $lstatements = 'if option user-class-identifier = \"xNBA\" { filename = \"http://'.$nxtsrv.'/tftpboot/xcat/xnba/nodes/'.$node.'\"; } else if exists client-architecture { filename = \"xcat/xnba.kpxe\"; } '.$lstatements; #Only PXE compliant clients should ever receive xNBA } } #TODO: warn when windows + } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'pxe' and $lstatements !~ /filename/) { + if (-f "$tftpdir/xcat/xnba.kpxe") { + if ($doiscsi and $chainent and $chainent->{currstate} and ($chainent->{currstate} eq 'iscsiboot' or $chainent->{currstate} eq 'boot')) { + $lstatements = 'if exists gpxe.bus-id { filename = \"\"; } else if exists client-architecture { filename = \"xcat/xnba.kpxe\"; } '.$lstatements; + } else { + $lstatements = 'filename = \"pxelinux.0\";'.$lstatements; + } + } }