mirror of
				https://github.com/vdsm/virtual-dsm.git
				synced 2025-11-04 08:54:51 +08:00 
			
		
		
		
	feat: Check host connection
This commit is contained in:
		
							parent
							
								
									a024294e19
								
							
						
					
					
						commit
						04bd8a1639
					
				@ -35,13 +35,30 @@ HOST_ARGS+=("-cpu_arch=${HOST_CPU}")
 | 
			
		||||
 | 
			
		||||
if [[ "${HOST_DEBUG}" == [Yy1]* ]]; then
 | 
			
		||||
  set -x
 | 
			
		||||
  ./run/host.bin "${HOST_ARGS[@]}" &
 | 
			
		||||
  ./host.bin "${HOST_ARGS[@]}" &
 | 
			
		||||
  { set +x; } 2>/dev/null
 | 
			
		||||
  echo
 | 
			
		||||
else
 | 
			
		||||
  ./run/host.bin "${HOST_ARGS[@]}" >/dev/null &
 | 
			
		||||
  ./host.bin "${HOST_ARGS[@]}" >/dev/null &
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
cnt=0
 | 
			
		||||
sleep 0.2
 | 
			
		||||
 | 
			
		||||
while ! nc -z -w1 127.0.0.1 2210 > /dev/null 2>&1; do
 | 
			
		||||
  sleep 0.1
 | 
			
		||||
  cnt=$((cnt + 1))
 | 
			
		||||
  (( cnt > 20 )) && error "Failed to connect to qemu-host.." && exit 58
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
cnt=0
 | 
			
		||||
 | 
			
		||||
while ! nc -z -w1 127.0.0.1 12345 > /dev/null 2>&1; do
 | 
			
		||||
  sleep 0.1
 | 
			
		||||
  cnt=$((cnt + 1))
 | 
			
		||||
  (( cnt > 20 )) && error "Failed to connect to qemu-host.." && exit 59
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Configure serial ports
 | 
			
		||||
 | 
			
		||||
SERIAL_OPTS="\
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user