2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-01 17:17:36 +00:00

bmcdiscover: normalize nodename if mtm or serial contain unauthorized

characters
This commit is contained in:
Kilian Cavalotti
2017-02-10 14:10:06 -08:00
parent 603c7785f7
commit 4bfdf4d908

View File

@@ -946,6 +946,7 @@ sub bmcdiscovery_ipmi {
if ($mtm and $serial) {
$node = "node-$mtm-$serial";
$node =~ s/(.*)/\L$1/g;
$node =~ s/[\s:\._]/-/g;
}
} elsif ($output =~ /error : unauthorized name/) {
xCAT::MsgUtils->message("E", { data => ["BMC username is incorrect for $ip"] }, $::CALLBACK);