Colors in log
This commit is contained in:
parent
80d9e293bb
commit
f54147e0fa
1 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ _graceful_shutdown() {
|
||||||
[ ! -f "${_QEMU_PID}" ] && return
|
[ ! -f "${_QEMU_PID}" ] && return
|
||||||
[ -f "${_QEMU_SHUTDOWN_COUNTER}" ] && return
|
[ -f "${_QEMU_SHUTDOWN_COUNTER}" ] && return
|
||||||
|
|
||||||
echo && echo "Received $1 signal, shutting down..."
|
echo && info "Received $1 signal, shutting down..."
|
||||||
echo 0 > "${_QEMU_SHUTDOWN_COUNTER}"
|
echo 0 > "${_QEMU_SHUTDOWN_COUNTER}"
|
||||||
|
|
||||||
# Send the shutdown (system_powerdown) command to the QMP monitor
|
# Send the shutdown (system_powerdown) command to the QMP monitor
|
||||||
|
@ -41,13 +41,13 @@ _graceful_shutdown() {
|
||||||
if echo 'info version'| nc -q 1 -w 1 localhost "${QEMU_MONPORT}" >/dev/null 2>&1 ; then
|
if echo 'info version'| nc -q 1 -w 1 localhost "${QEMU_MONPORT}" >/dev/null 2>&1 ; then
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
echo "Shutting down, waiting... ($(cat ${_QEMU_SHUTDOWN_COUNTER})/${QEMU_POWERDOWN_TIMEOUT})"
|
info "Shutting down, waiting... ($(cat ${_QEMU_SHUTDOWN_COUNTER})/${QEMU_POWERDOWN_TIMEOUT})"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo && echo "Quitting..."
|
echo && echo "❯ Quitting..."
|
||||||
echo 'quit' | nc -q 1 -w 1 localhost "${QEMU_MONPORT}" >/dev/null 2>&1 || true
|
echo 'quit' | nc -q 1 -w 1 localhost "${QEMU_MONPORT}" >/dev/null 2>&1 || true
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue