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
This commit is contained in:
wanghuaz 2009-07-15 08:22:51 +00:00
parent 92d2b2f127
commit 1e794980a3

View File

@ -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"]});