mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-09-10 12:18:26 +00:00
Add a workaround for wrong hwaddr
Sometimes the client sends 20: before the address, adapt to cope
This commit is contained in:
@@ -821,7 +821,7 @@ sub addnode
|
||||
}
|
||||
my @hwtypes;
|
||||
if ($hardwaretype == 1) {
|
||||
@hwtypes = (1, 132);
|
||||
@hwtypes = (1, 132, 133);
|
||||
} else {
|
||||
@hwtypes = ($hardwaretype);
|
||||
}
|
||||
@@ -834,6 +834,11 @@ sub addnode
|
||||
$localname .= "-infinibandcompatname";
|
||||
$localmac = substr($mac, 0, 8) . ":03:00" . substr($mac, 8);
|
||||
}
|
||||
if ($hwtype == 133) {
|
||||
$hwtype = 32;
|
||||
$localname .= "-infinibandcompatname20";
|
||||
$localmac = "20:" . substr($mac, 0, 8) . ":03:00" . substr($mac, 8);
|
||||
}
|
||||
print $omshell "new host\n";
|
||||
print $omshell "set name = \"$localname\"\n";
|
||||
print $omshell "set hardware-address = " . $localmac . "\n";
|
||||
|
Reference in New Issue
Block a user