From c24dbcdabb6ee96d0a46d454167d189058284c43 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Mon, 25 Mar 2024 23:29:12 +0100 Subject: [PATCH] =?UTF-8?q?qemush=20:=20ajout=20possibilit=C3=A9=20de=20la?= =?UTF-8?q?ncer=20une=20VM=20en=20avant-plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/qemush | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/qemush b/bin/qemush index fc83da7..4233eb3 100755 --- a/bin/qemush +++ b/bin/qemush @@ -53,12 +53,20 @@ error_usage() { # Function to start a virtual machine public_start() { + if [ "$1" = -f ] || [ "$1" = --foreground ]; then + daemonize= + else + daemonize=-daemonize + fi + + while echo "$1" | grep -q '^-'; do shift; done; + export QEMUSH_NAME="$1" set -- "$@" \ -name "$QEMUSH_NAME" \ -monitor "unix:$(pathof socket),server,nowait" \ - -daemonize + $daemonize if ! "$@"; then perror "error launching virtual machine \"${QEMUSH_NAME}\""