From 7ab99cfedd0b825efac14fbeb9f5d4e58008dd14 Mon Sep 17 00:00:00 2001 From: Nils Freydank Date: Sun, 19 May 2024 22:14:16 +0200 Subject: [PATCH] Introduce combined flags --- control-vm.sh | 4 ++++ todo | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/control-vm.sh b/control-vm.sh index c934f30..e2e0e5c 100755 --- a/control-vm.sh +++ b/control-vm.sh @@ -286,6 +286,9 @@ resume_qemu(){ # === Parse the user input. === # "$1 != nothing" is already checked earlier. case "${2}" in + start+connect) start_qemu && connect_to_vm;; + stop+restore) stop_qemu && restore_qemu;; + restore+restart) stop_qemu && restore_qemu && start_qemu && connect_to_vm;; start) start_qemu;; shutdown) shutdown_qemu;; stop) stop_qemu;; @@ -296,6 +299,7 @@ case "${2}" in resume) resume_qemu;; *) echo "Unknown Operation!" echo "Use one of: start | shutdown | stop | connect | save | restore | pause | resume" + echo "or combinations: start+connect | stop+restore | restore+restart" echo "Note that stop means a forced stop.";; esac # vim:fileencoding=utf-8:ts=4:syntax=bash:expandtab diff --git a/todo b/todo index 8988c12..c76f2d5 100644 --- a/todo +++ b/todo @@ -4,8 +4,6 @@ # 3. clipboard support via spice # 4. Support boot from CD for first installations. # 5. query status -# 6. save and stop in a single command? -# same for restore: stop, restore, cont(inue) # 7. shared dir without smb, but via FUSE # 8. bash and zsh-completion # 9. don't rely on the PID to check if the VM is running, query socket?