diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 13de70c85..9e65264cd 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -334,6 +334,15 @@ sub process_command { } } if ( $ip && $mac ) { + if ( !exists( $request->{opt}->{d} ) ) { + ##################################### + # Write adapter mac to database + ##################################### + my $mactab = xCAT::Table->new( "mac", -create=>1, -autocommit=>1 ); + $mactab->setNodeAttribs( $_,{mac=>$mac} ); + $mactab->close(); + } + $callback->({data=>["$_:"]}); $callback->({data=>["#IP MAC"]}); $callback->({data=>["$ip $mac\n"]});