2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

1. appending "statement" within makedhcp rather than from nodeset, find corrent tftpserver for petitboot booting; 2. Use hvc0 for ppc64 genesis shell

This commit is contained in:
ertaozh 2015-05-13 03:40:35 -04:00
parent 6a8343d27d
commit ff20b96dba
2 changed files with 34 additions and 1 deletions

View File

@ -400,7 +400,11 @@ sub setdestiny {
}
$ent = $hments->{$_}->[0]; #$nodehm->getNodeAttribs($_,['serialport','serialspeed','serialflow']);
if ($ent and defined($ent->{serialport})) {
$kcmdline .= "console=tty0 console=ttyS".$ent->{serialport};
if ($arch eq "ppc64") {
$kcmdline .= "console=tty0 console=hvc".$ent->{serialport};
} else {
$kcmdline .= "console=tty0 console=ttyS".$ent->{serialport};
}
#$ent = $nodehm->getNodeAttribs($_,['serialspeed']);
unless ($ent and defined($ent->{serialspeed})) {
$callback->({error=>["Serial port defined in noderes, but no nodehm.serialspeed set for $_"],errorcode=>[1]});

View File

@ -500,6 +500,35 @@ sub addnode
{
$guess_next_server = 1;
}
if ($nrent->{netboot} and $nrent->{netboot} eq 'petitboot') {
if ($guess_next_server) {
my $node_server = undef;
if ($nrent->{xcatmaster}) {
$node_server = $nrent->{xcatmaster};
} elsif ($nrent->{servicenode}) {
$node_server = $nrent->{servicenode};
}
unless($node_server) {
$nxtsrv = xCAT::NetworkUtils->my_ip_facing($node);
unless($nxtsrv) {
$callback->({ error => ["Unable to determine the tftpserver for node"], errorcode => [1]});
return;
}
} else {
my $tmp_server = inet_aton($node_server);
unless($tmp_server) {
$callback->({ error => ["Unable to resolve the tftpserver for node"], errorcode => [1]});
return;
}
$nxtsrv = inet_ntoa($tmp_server);
}
unless ($nxtsrv) {
$callback->({ error => ["Unable to determine the tftpserver for node"], errorcode => [1]});
return;
}
$guess_next_server = 0;
}
}
#else {
# $nrent = $nrtab->getNodeAttribs($node,['servicenode']);