mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	enhance for finding bootnic in genesis
This commit is contained in:
		| @@ -146,10 +146,24 @@ if [[ -n $hostip && -n $netmask && -n $gateway && -n $bootnic ]]; then | ||||
| else | ||||
| 	echo "Setting IP via DHCP..." | ||||
| # This section is for System P hardware discovery, which won't have a BOOTIF value set | ||||
|         tries=0 | ||||
|         while [ $tries -lt 5 ]; do | ||||
|             if [ -z "$bootnic" ]; then | ||||
|                 ALLUP_NICS=`ip link show | grep -v "^ " | grep "state UP" | awk '{print $2}' | sed -e 's/:$//'|grep -v lo` | ||||
|                 for tmp1 in $ALLUP_NICS; do | ||||
|                     bootnic=$tmp1 | ||||
|                     break | ||||
|                 done | ||||
|             else | ||||
|                 break | ||||
|             fi | ||||
|             sleep 2 | ||||
|             tries=$(($tries+1)) | ||||
|         done | ||||
|         if [ -z "$bootnic" ]; then | ||||
|             ALLUP_NICS=`ip link show | grep -v "^ " | grep "state UP" | awk '{print $2}' | sed -e 's/:$//'|grep -v lo` | ||||
|             for tmp1 in $ALLUP_NICS; do | ||||
|                 bootnic=$tmp1 | ||||
|             ALL_NICS=`ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo` | ||||
|             for tmp in $ALL_NICS; do | ||||
|                 bootnic=$tmp | ||||
|                 break | ||||
|             done | ||||
|         fi | ||||
|   | ||||
| @@ -353,7 +353,7 @@ sub process_request { | ||||
|         $callback->({error=> ["The node [$node] should have a correct IP address which belongs to the management network."], errorcode=>["1"]}); | ||||
|         return; | ||||
|     } | ||||
|     if (defined ($request->{pbmc_node})) { | ||||
|     if (defined ($request->{pbmc_node}) and defined($request->{pbmc_node}->[0]) ) { | ||||
|         my $pbmc_node = $request->{pbmc_node}->[0]; | ||||
|         xCAT::Utils->cleanup_for_powerLE_hardware_discovery($node, $pbmc_node, $doreq); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user