Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/power.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ QEMU_LOG="$QEMU_DIR/qemu.log"
QEMU_OUT="$QEMU_DIR/qemu.out"
QEMU_END="$QEMU_DIR/qemu.end"
Comment on lines 8 to 12

rm -f "$QEMU_DIR/qemu.*"
touch "$QEMU_LOG"

_trap() {
func="$1" ; shift
local func="$1" ; shift
for sig ; do
trap "$func $sig" "$sig"
done
Comment on lines 14 to 18
Comment on lines 14 to 18
Expand Down Expand Up @@ -230,6 +227,9 @@ _graceful_shutdown() {
finish "$code" && return "$code"
}

[[ -n "${QEMU_DIR:-}" && "$QEMU_DIR" != "/" ]] && rm -f "$QEMU_DIR"/qemu.*
touch "$QEMU_LOG"

SERIAL="pty"
MONITOR="telnet:localhost:$MON_PORT,server,nowait,nodelay -daemonize -D $QEMU_LOG"

Expand Down