-Add feature for nodeset install/netboot to accept '=' style argument to specify new nodetype parameters
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3649 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
3344ec3af3
commit
87483ce6b8
@ -123,8 +123,26 @@ sub setdestiny {
|
||||
if ($ient->{kcmdline}) { $hash->{kcmdline} = $ient->{kcmdline} }
|
||||
$bptab->setNodeAttribs($_,$hash);
|
||||
}
|
||||
} elsif ($state =~ /^install$/ or $state eq "install" or $state eq "netboot" or $state eq "image" or $state eq "winshell") {
|
||||
} elsif ($state =~ /^install[=\$]/ or $state eq 'install' or $state =~ /^netboot[=\$]/ or $state eq 'netboot' or $state eq "image" or $state eq "winshell") {
|
||||
chomp($state);
|
||||
my $target;
|
||||
if ($state =~ /=/) {
|
||||
($state,$target) = split /=/,$state,2;
|
||||
}
|
||||
if ($target) {
|
||||
my $updateattribs;
|
||||
if ($target =~ /(.*)-(.*)-(.*)/) {
|
||||
$updateattribs->{os}=$1;
|
||||
$updateattribs->{arch}=$2;
|
||||
$updateattribs->{profile}=$3;
|
||||
} else {
|
||||
$updateattribs->{profile}=$target;
|
||||
}
|
||||
my $nodetypetable = xCAT::Table->new('nodetype',-create=>1);
|
||||
$nodetypetable->setNodesAttribs($req->{node},$updateattribs);
|
||||
}
|
||||
|
||||
|
||||
$errored=0;
|
||||
$subreq->({command=>["mk$state"],
|
||||
node=>$req->{node}}, \&relay_response);
|
||||
|
Loading…
Reference in New Issue
Block a user