correct syntax error while calling validate_ip

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14240 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
leiaibj 2012-11-05 03:22:16 +00:00
parent ce737cfcda
commit 886bb5145f

View File

@ -606,7 +606,7 @@ Usage:
if (exists $allips{$args_dict{'ip'}}){
setrsp_errormsg("Specified IP address $args_dict{'ip'} conflicts with IPs in database");
return;
}elsif((xCAT::NetworkUtils->validate_ip($args_dict{'ip'}))[0][0] ){
}elsif((xCAT::NetworkUtils->validate_ip($args_dict{'ip'}))[0]->[0] ){
setrsp_errormsg("Specified IP address $args_dict{'ip'} is invalid");
return;
}elsif(xCAT::NetworkUtils->isReservedIP($args_dict{'ip'})){
@ -1462,7 +1462,7 @@ sub validate_node_entry{
}elsif ($_ eq "ip"){
if (exists $allips{$node_entry{$_}}){
return "Specified IP address $node_entry{$_} conflicts with IPs in database or hostinfo file";
}elsif((xCAT::NetworkUtils->validate_ip($node_entry{$_}))[0][0] ){
}elsif((xCAT::NetworkUtils->validate_ip($node_entry{$_}))[0]->[0] ){
return "Specified IP address $node_entry{$_} is invalid";
}elsif(xCAT::NetworkUtils->isReservedIP($node_entry{$_})){
return "Specified IP address $node_entry{$_} is invalid";