mirror of
				https://github.com/vdsm/virtual-dsm.git
				synced 2025-11-04 08:54:51 +08:00 
			
		
		
		
	fix: Display timeout
This commit is contained in:
		
							parent
							
								
									fafd4a4fca
								
							
						
					
					
						commit
						3bcd831531
					
				@ -4,7 +4,7 @@ set -Eeuo pipefail
 | 
			
		||||
# Configure QEMU for graceful shutdown
 | 
			
		||||
 | 
			
		||||
QEMU_PORT=7100
 | 
			
		||||
QEMU_TIMEOUT=50
 | 
			
		||||
QEMU_TIMEOUT=55
 | 
			
		||||
QEMU_PID="/run/qemu.pid"
 | 
			
		||||
QEMU_COUNT="/run/qemu.count"
 | 
			
		||||
 | 
			
		||||
@ -67,6 +67,10 @@ _graceful_shutdown() {
 | 
			
		||||
 | 
			
		||||
  done
 | 
			
		||||
 | 
			
		||||
  if [ "$(cat $QEMU_COUNT)" -ge "$QEMU_TIMEOUT" ]; then
 | 
			
		||||
    echo && error "Shutdown timeout reached, forcefully quitting.."
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  echo && echo "❯ Quitting..."
 | 
			
		||||
  echo 'quit' | nc -q 1 -w 1 localhost "$QEMU_PORT" >/dev/null 2>&1 || true
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user