Commit fb9b6591 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Sync

parent 62416089
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -21,13 +21,12 @@ _trap(){

_graceful_shutdown() {

  set +e

  [ ! -f "${_QEMU_PID}" ] && return
  [ -f "${_QEMU_SHUTDOWN_COUNTER}" ] && return

  set +e

  echo
  echo "Received $1 signal, shutting down..."
  echo && echo "Received $1 signal, shutting down..."
  echo 0 > "${_QEMU_SHUTDOWN_COUNTER}"

  # Send the shutdown (system_powerdown) command to the QMP monitor
@@ -48,8 +47,7 @@ _graceful_shutdown() {

  done

  echo
  echo "Quitting..."
  echo && echo "Quitting..."
  echo 'quit' | nc -q 1 -w 1 localhost "${QEMU_MONPORT}" > /dev/null || true

  return