-Add a feature for discovery, if table has wrong netboot method for architecture discovered, correct it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1324 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
4359748a26
commit
f0474e4b0d
@ -114,6 +114,17 @@ sub process_request {
|
||||
} else {
|
||||
$typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0]});
|
||||
}
|
||||
my $currboot='';
|
||||
my $nrtab = xCAT::Table->new('noderes'); #Attempt to check and set if wrong the netboot method on discovery, if admin omitted
|
||||
(my $rent) = $nrtab->getNodeAttribs($node,'netboot');
|
||||
if ($rent and $rent->{'netboot'}) {
|
||||
$currboot=$rent->{'netboot'};
|
||||
}
|
||||
if ($request->{arch}->[0] =~ /x86/ and $currboot !~ /pxe/) {
|
||||
$nrtab->setNodeAttribs($node,{netboot=>'pxe'});
|
||||
} elsif ($request->{arch}->[0] =~ /ppc/ and $currboot !~ /yaboot/) {
|
||||
$nrtab->setNodeAttribs($node,{netboot=>'yaboot'});
|
||||
}
|
||||
}
|
||||
if (defined($request->{mac})) {
|
||||
my $mactab = xCAT::Table->new("mac",-create=>1);
|
||||
|
Loading…
Reference in New Issue
Block a user