mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 20:30:56 +00:00
set nodename as pdu or switch incase no name get by snmp or nmap
This commit is contained in:
@ -351,6 +351,9 @@ sub process_request {
|
||||
#appending mac address to end of hostname
|
||||
my $name = $result->{$_}->{name};
|
||||
if (exists $username_hash{$name}) {
|
||||
if ($name eq '') {
|
||||
$name = "$device";
|
||||
}
|
||||
my $mac_str = lc($_);
|
||||
$mac_str =~ s/\://g;
|
||||
$result->{$_}->{name} = "$name-$mac_str";
|
||||
|
Reference in New Issue
Block a user