Compare commits
No commits in common. "3514fa96ef37f543adc17c3e2f704de51bbffe16" and "95189e503f7e7c02dfbf116ccfe2f6dd747089d4" have entirely different histories.
3514fa96ef
...
95189e503f
3 changed files with 20 additions and 53 deletions
|
@ -23,9 +23,6 @@ case "$1" in
|
||||||
spice)
|
spice)
|
||||||
basedir=sockets/spice
|
basedir=sockets/spice
|
||||||
;;
|
;;
|
||||||
shared)
|
|
||||||
basedir=shared
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
false
|
false
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,24 +1,11 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env sh
|
||||||
use warnings;
|
base=$(echo "$QEMUSH_BASE" | cut -d , -f 1)
|
||||||
use strict;
|
QEMUSH_BASE=$(echo "$QEMUSH_BASE" | sed "s/^${base}//" | sed 's/^,//')
|
||||||
|
|
||||||
my @launchers_chain = ("kvm");
|
set -- "$base" \
|
||||||
|
-fsdev local,security_model=passthrough,id=fsdev0,path="${HOME}/shared/${QEMUSH_NAME}" \
|
||||||
|
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=shared \
|
||||||
|
"$@"
|
||||||
|
|
||||||
if (defined $ENV{'QEMUSH_BASE'}) {
|
set -x
|
||||||
@launchers_chain = split ",", $ENV{'QEMUSH_BASE'};
|
exec "$@"
|
||||||
}
|
|
||||||
|
|
||||||
my $base = shift @launchers_chain;
|
|
||||||
$ENV{'QEMUSH_BASE'} = join ",", @launchers_chain;
|
|
||||||
|
|
||||||
chomp(my $shared_folder = `pathof shared`);
|
|
||||||
|
|
||||||
my @command = (
|
|
||||||
$base,
|
|
||||||
"-fsdev", "local,security_model=passthrough,id=fsdev0,path=${shared_folder}",
|
|
||||||
"-device", "virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=shared",
|
|
||||||
@ARGV
|
|
||||||
);
|
|
||||||
|
|
||||||
print "+ exec ", join(" ", @command), "\n";
|
|
||||||
exec @command;
|
|
||||||
|
|
|
@ -1,29 +1,12 @@
|
||||||
#!/usr/bin/env perl
|
#!/bin/sh -x
|
||||||
use warnings;
|
base=$(echo "$QEMUSH_BASE" | cut -d , -f 1)
|
||||||
use strict;
|
QEMUSH_BASE=$(echo "$QEMUSH_BASE" | sed "s/^${base}//" | sed 's/^,//')
|
||||||
|
|
||||||
my @launchers_chain = ("kvm");
|
exec "$base" \
|
||||||
|
-vga qxl \
|
||||||
if (defined $ENV{'QEMUSH_BASE'}) {
|
-chardev spicevmc,id=vdagent,debug=0,name=vdagent \
|
||||||
@launchers_chain = split ",", $ENV{'QEMUSH_BASE'};
|
-device virtio-serial \
|
||||||
}
|
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
|
||||||
|
-spice port="$(first-free-port 5900)",addr=::1,disable-ticketing=on \
|
||||||
my $base = shift @launchers_chain;
|
-audiodev spice,id=snd0 \
|
||||||
$ENV{'QEMUSH_BASE'} = join ",", @launchers_chain;
|
"$@"
|
||||||
|
|
||||||
chomp(my $socket_path = `pathof spice`);
|
|
||||||
|
|
||||||
my @command = (
|
|
||||||
$base,
|
|
||||||
"-vga", "qxl",
|
|
||||||
"-chardev", "spicevmc,id=vdagent,debug=0,name=vdagent",
|
|
||||||
"-device", "virtio-serial",
|
|
||||||
"-device", "virtserialport,chardev=vdagent,name=com.redhat.spice.0",
|
|
||||||
"-spice", "unix=on,addr=${socket_path},disable-ticketing=on",
|
|
||||||
"-audiodev", "spice,id=snd0",
|
|
||||||
@ARGV
|
|
||||||
);
|
|
||||||
|
|
||||||
print "+ exec ", join(" ", @command), "\n";
|
|
||||||
exit;
|
|
||||||
exec @command;
|
|
||||||
|
|
Loading…
Reference in a new issue