mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	when no ipmitool-xcat tool, report error before go ahead the real discovery
This commit is contained in:
		| @@ -322,22 +322,29 @@ sub bmcdiscovery_processargs { | ||||
|         ###################################### | ||||
|         # check if there is nmap or not | ||||
|         ###################################### | ||||
|         if (-x '/usr/bin/nmap') | ||||
|         { | ||||
|         if (-x '/usr/bin/nmap') { | ||||
|             $nmap_path = "/usr/bin/nmap"; | ||||
|         } | ||||
|         elsif (-x '/usr/local/bin/nmap') | ||||
|         { | ||||
|         elsif (-x '/usr/local/bin/nmap') { | ||||
|             $nmap_path = "/usr/local/bin/nmap"; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|         else { | ||||
|             my $rsp; | ||||
|             push @{ $rsp->{data} }, "\tThere is no nmap in /usr/bin/ or /usr/local/bin/. \n "; | ||||
|             xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); | ||||
|             return 1; | ||||
|         } | ||||
|  | ||||
|         ###################################### | ||||
|         # check if there is ipmitool-xcat or not | ||||
|         ###################################### | ||||
|         unless (-x '/opt/xcat/bin/ipmitool-xcat') { | ||||
|             my $rsp; | ||||
|             push @{ $rsp->{data} }, "\tThere is no ipmitool-xcat in /opt/xcat/bin/, make sure that package ipmitool-xcat is installed successfully.\n "; | ||||
|             xCAT::MsgUtils->message("E", $rsp, $::CALLBACK); | ||||
|             return 1; | ||||
|         } | ||||
|  | ||||
|         if ($::opt_T) { | ||||
|             my $msg = "The -t option is deprecated and will be ignored"; | ||||
|             my $rsp = {}; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user