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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user