-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
This commit is contained in:
jbjohnso 2009-09-28 14:07:42 +00:00
parent c44c7eb25c
commit d33eb736f1

View File

@ -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;
}
}
}