Fixed defect 2840135 that getmacs -F option containing wrong format but not returen error.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4362 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e929e99f54
commit
f2965109a5
@ -179,6 +179,21 @@ sub parse_args {
|
||||
} elsif ( exists($opt{S}) || exists($opt{G}) || exists($opt{C}) ) {
|
||||
return( [RC_ERROR,"Option '-D' is required for ping test\n"] );
|
||||
}
|
||||
|
||||
####################################
|
||||
# Check -F options's format
|
||||
####################################
|
||||
if ( exists($opt{F}) ) {
|
||||
my @filters = split /,/,$opt{F};
|
||||
foreach ( @filters ) {
|
||||
my @value = split /=/,$_;
|
||||
if ( !@value[1] ) {
|
||||
return( usage("Option '-F' contains wrong filter format") );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
####################################
|
||||
# Set method to invoke
|
||||
####################################
|
||||
|
Loading…
Reference in New Issue
Block a user