mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	enhance errror msg if -u or -p is none for teamsun task45786.
This commit is contained in:
		| @@ -224,11 +224,25 @@ sub bmcdiscovery_processargs { | ||||
|     ######################################### | ||||
|     # Option -i -u -p -c should be used together | ||||
|     ###################################### | ||||
|     if ( defined($::opt_U) && defined($::opt_P) && defined($::opt_C) && defined($::opt_I) )  | ||||
|  | ||||
|     if ( defined($::opt_U) ||  defined($::opt_P) || defined($::opt_C) || defined($::opt_I) ) | ||||
|     { | ||||
|         my $res=check_auth_process($::opt_I,$::opt_U,$::opt_P); | ||||
|         return $res; | ||||
|         if ( defined($::opt_U) && defined($::opt_P) && defined($::opt_C) && defined($::opt_I) )  | ||||
|         { | ||||
|              my $res=check_auth_process($::opt_I,$::opt_U,$::opt_P); | ||||
|              return $res; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|              my $msg = "bmc_ip or bmcuser or bmcpw is empty."; | ||||
|              my $rsp = {}; | ||||
|              push @{ $rsp->{data} }, "$msg"; | ||||
|              xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); | ||||
|              return 2; | ||||
|         } | ||||
|  | ||||
|     } | ||||
|  | ||||
|     ######################################### | ||||
|     # Other attributes are not allowed | ||||
|     ######################################### | ||||
|   | ||||
		Reference in New Issue
	
	Block a user