From 1e794980a31bda4e908ea88645bd3f414291b919 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Wed, 15 Jul 2009 08:22:51 +0000 Subject: [PATCH] get mac from arp protocal git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3784 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 9 +++++++++ 1 file changed, 9 insertions(+) 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"]});