qemush : ajout possibilité de lancer une VM en avant-plan
This commit is contained in:
parent
c114fe0b08
commit
c24dbcdabb
1 changed files with 9 additions and 1 deletions
10
bin/qemush
10
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}\""
|
||||
|
|
Loading…
Reference in a new issue