mirror of
				https://github.com/vdsm/virtual-dsm.git
				synced 2025-11-04 08:54:51 +08:00 
			
		
		
		
	dhclient
This commit is contained in:
		
							parent
							
								
									96d6caafb1
								
							
						
					
					
						commit
						f076793786
					
				@ -26,8 +26,8 @@ configureMacVlan () {
 | 
			
		||||
  ip a flush eth0
 | 
			
		||||
  ip a flush ${VM_NET_TAP}
 | 
			
		||||
 | 
			
		||||
  udhcpc -v ${VM_NET_TAP}
 | 
			
		||||
  _DhcpIP=$( udhcpc -v ${VM_NET_TAP} 2>&1 | grep ^bound | cut -d' ' -f3 )
 | 
			
		||||
  dhclient -v ${VM_NET_TAP}
 | 
			
		||||
  _DhcpIP=$( dhclient -v ${VM_NET_TAP} 2>&1 | grep ^bound | cut -d' ' -f3 )
 | 
			
		||||
  [[ "${_DhcpIP}" == [0-9.]* ]] \
 | 
			
		||||
  && echo "Info: Retrieved IP: ${_DhcpIP} from DHCP with MAC: ${VM_NET_MAC}" \
 | 
			
		||||
  || ( echo "ERROR: Cannot retrieve IP from DHCP with MAC: ${VM_NET_MAC}" && exit 16 )
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user