diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index ebc596521..3ba9b28c1 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -4789,20 +4789,22 @@ ll~; # define the node my $defcmd = "/usr/sbin/nim -o define -t $type "; - $objhash{$node}{'mac'} =~ s/://g; # strip out colons if any - $defcmd .= "-a if1='find_net $nodeshorthost $objhash{$node}{'mac'}' "; + if ($::NEWNAME) { + $defcmd .= "-a if1='find_net $nodeshorthost 0' "; + } else { + $objhash{$node}{'mac'} =~ s/://g; # strip out colons if any + $defcmd .= "-a if1='find_net $nodeshorthost $objhash{$node}{'mac'}' "; + } $defcmd .= "-a cable_type1=N/A -a netboot_kernel=mp "; $defcmd .= "-a net_definition='ent $nethash{$node}{'mask'} $nethash{$node}{'gateway'}' "; $defcmd .= "-a net_settings1='$speed $duplex' "; $defcmd .= "$nim_name 2>&1"; - if ($::VERBOSE) { my $rsp; push @{$rsp->{data}}, "$Sname: Creating NIM node definition.\n"; push @{$rsp->{data}}, "Running: \'$defcmd\'\n"; xCAT::MsgUtils->message("I", $rsp, $callback); } - my $output = xCAT::Utils->runcmd("$defcmd", -1); if ($::RUNCMD_RC != 0) {