-Change BCD hack to a more tftp agnostic approach that is less dependent on knowledge of IP address ahead of time

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6202 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-05-21 18:34:17 +00:00
parent 2633fa8170
commit c4ea16f807

View File

@ -121,12 +121,6 @@ sub mkwinlinks {
my $ent = shift;
foreach (getips($node)) {
link "$installroot/autoinst/$node.cmd","$installroot/autoinst/$_.cmd";
unlink "/tftpboot/Boot/BCD.$_";
if ($ent->{arch} =~ /64/) {
symlink "/tftpboot/Boot/BCD.64","/tftpboot/Boot/BCD.$_";
} else {
symlink "/tftpboot/Boot/BCD.32","/tftpboot/Boot/BCD.$_";
}
}
}
@ -233,7 +227,7 @@ sub mkinstall
print $shandle $script;
close($shandle);
mkwinlinks($node,$ent);
if ($arch =~ /x86/)
if ($arch =~ /x86_64/)
{
$bptab->setNodeAttribs(
$node,
@ -243,6 +237,40 @@ sub mkinstall
kcmdline => ""
}
);
} elsif ($arch =~ /x86/) {
unless (-r "$tftpdir/Boot/pxeboot32.0") {
my $origpxe;
my $pxeboot;
open($origpxe,"<$tftpdir/Boot/pxeboot.0");
open($pxeboot,">$tftpdir/Boot/pxeboot32.0");
binmode($origpxe);
binmode($pxeboot);
my @origpxecontent = <$origpxe>;
foreach (@origpxecontent) {
s/bootmgr.exe/bootm32.exe/;
print $pxeboot $_;
}
}
unless (-r "$tftpdir/bootm32.exe") {
my $origmgr;
my $bootmgr;
open($origmgr,"<$tftpdir/bootmgr.exe");
open($bootmgr,">$tftpdir/bootm32.exe");
binmode($origmgr);
binmode($bootmgr);
foreach (@data) {
s/(\\.B.o.o.t.\\.B.)C(.)D/${1}3${2}2/; # 16 bit encoding... cheat
print $bootmgr $_;
}
}
$bptab->setNodeAttribs(
$node,
{
kernel => "Boot/pxeboot32.0",
initrd => "",
kcmdline => ""
}
);
}
next;
}