fix rack generation

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1111 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2008-04-17 18:19:19 +00:00
parent 606db1ded4
commit 018ebe529b

View File

@ -30,12 +30,15 @@ my $rc = 0;
my $cmd = "";
my @bladename;
@bladename=("a","b","c");
my $count=0;
my $rackno="01";
foreach my $CU (@::CU)
{
foreach my $range (@::RANGE)
{
foreach my $blade (@bladename)
{
$rack="rack";
$cmd = "rr";
$cmd .= $CU;
$cmd .= $range;
@ -52,12 +55,19 @@ foreach my $CU (@::CU)
}
}
if ($CU eq "a" ) {
# calculate the rack number ( 12 triblades/rack)
if ($count < 36) { # each 36 blades
$rack .= $rackno;
$count++;
} else { # increment to next rack
$rack="rack";
$rackno++;
$rack .= $rackno;
$count =0;
}
$cmd .= ",rack05";
} else {
$cmd .= ",rack06";
}
$cmd .= ",";
$cmd .= $rack;
if ($::DELETE) {
system("noderm $cmd");
} else {