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:
parent
6a8343d27d
commit
ff20b96dba
@ -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]});
|
||||
|
@ -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']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user