mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-29 15:51:18 +00:00
-Nodeset netboot support for xen style stateless
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2793 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
@@ -149,6 +149,7 @@ sub process_request
|
||||
|
||||
sub mknetboot
|
||||
{
|
||||
my $xenstyle=0;
|
||||
my $req = shift;
|
||||
my $callback = shift;
|
||||
my $doreq = shift;
|
||||
@@ -249,6 +250,11 @@ sub mknetboot
|
||||
|
||||
#TODO: only copy if newer...
|
||||
unless ($donetftp{$osver,$arch,$profile}) {
|
||||
if (-f "/$installroot/netboot/$osver/$arch/$profile/hypervisor") {
|
||||
copy("/$installroot/netboot/$osver/$arch/$profile/hypervisor",
|
||||
"/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
|
||||
$xenstyle=1;
|
||||
}
|
||||
copy("/$installroot/netboot/$osver/$arch/$profile/kernel",
|
||||
"/$tftpdir/xcat/netboot/$osver/$arch/$profile/");
|
||||
copy("/$installroot/netboot/$osver/$arch/$profile/initrd.gz",
|
||||
@@ -363,10 +369,14 @@ sub mknetboot
|
||||
|
||||
}
|
||||
|
||||
my $kernstr="xcat/netboot/$osver/$arch/$profile/kernel";
|
||||
if ($xenstyle) {
|
||||
$kernstr.= "!xcat/netboot/$osver/$arch/$profile/hypervisor";
|
||||
}
|
||||
$bptab->setNodeAttribs(
|
||||
$node,
|
||||
{
|
||||
kernel => "xcat/netboot/$osver/$arch/$profile/kernel",
|
||||
kernel => "$kernstr",
|
||||
initrd => "xcat/netboot/$osver/$arch/$profile/initrd.gz",
|
||||
kcmdline => $kcmdline
|
||||
}
|
||||
|
@@ -78,6 +78,13 @@ sub setstate {
|
||||
print $pcfg "LOCALBOOT 0\n";
|
||||
close($pcfg);
|
||||
} elsif ($kern and $kern->{kernel}) {
|
||||
if ($kern->{kernel} =~ /!/) {
|
||||
my $hypervisor;
|
||||
my $kernel;
|
||||
($kernel,$hypervisor) = split /!/,$kern->{kernel};
|
||||
print $pcfg " KERNEL mboot.c32\n";
|
||||
print $pcfg " APPEND $hypervisor --- $kernel ".$kern->{kcmdline}." --- ".$kern->{initrd}."\n";
|
||||
} else {
|
||||
#It's time to set pxelinux for this node to boot the kernel..
|
||||
print $pcfg " KERNEL ".$kern->{kernel}."\n";
|
||||
if ($kern->{initrd} or $kern->{kcmdline}) {
|
||||
@@ -91,6 +98,7 @@ sub setstate {
|
||||
} else {
|
||||
print $pcfg "\n";
|
||||
}
|
||||
}
|
||||
close($pcfg);
|
||||
my $inetn = inet_aton($node);
|
||||
unless ($inetn) {
|
||||
|
Reference in New Issue
Block a user