Added getmacs -M option to disable mac address failover

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11758 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2012-03-06 07:51:22 +00:00
parent ab867292a3
commit ff00b0716e
3 changed files with 6 additions and 1 deletions

View File

@ -349,6 +349,10 @@ sub getmacs {
if( $mac_addr ) {
$mac_addr = format_mac($mac_addr);
}
if ( !exists( $opt->{M} )) {
my @mac_addrs = split /\|/, $mac_addr;
$mac_addr = @mac_addrs[0];
}
$att{'MAC_Address'} = ($mac_addr) ? $mac_addr : "N/A";
$att{'Adapter'} = ($adapter_id) ? $adapter_id : "N/A";
$att{'Port_Group'} = ($port_group) ? $port_group : "N/A";

View File

@ -46,7 +46,7 @@ sub parse_args {
$Getopt::Long::ignorecase = 0;
Getopt::Long::Configure( "bundling" );
if ( !GetOptions( \%opt,qw(h|help V|Verbose v|version C=s G=s S=s D d f o F=s arp))) {
if ( !GetOptions( \%opt,qw(h|help V|Verbose v|version C=s G=s S=s D d f M o F=s arp))) {
return( usage() );
}
####################################

View File

@ -181,6 +181,7 @@ my %usage = (
getmacs [-h|--help|-v|--version]
PPC specific:
getmacs <noderange> [-F filter]
getmacs <noderange> [-M]
getmacs <noderange> [-V| --verbose] [-f] [-d] [--arp] | [-D [-S server] [-G gateway] [-C client]]
blade specific:
getmacs <noderange> [-V| --verbose] [-d] [--arp]