Compare commits

..

No commits in common. "95189e503f7e7c02dfbf116ccfe2f6dd747089d4" and "8c3dc221199f300a363ca9bbd577a24fca882ee3" have entirely different histories.

3 changed files with 2 additions and 18 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# version=0.6.0 # version=0.5.0
# Function to re-exec the script as another user via sudo (only if needed) # Function to re-exec the script as another user via sudo (only if needed)
exec_as() { exec_as() {
@ -66,7 +66,6 @@ public_start() {
QEMUSH_NAME="$1" QEMUSH_NAME="$1"
set -- "$@" \ set -- "$@" \
-name "$QEMUSH_NAME" \
-monitor "unix:$(pathof socket),server,nowait" \ -monitor "unix:$(pathof socket),server,nowait" \
-daemonize -daemonize
if ! "$@"; then if ! "$@"; then

View file

@ -1,11 +0,0 @@
#!/usr/bin/env sh
base=$(echo "$QEMUSH_BASE" | cut -d , -f 1)
QEMUSH_BASE=$(echo "$QEMUSH_BASE" | sed "s/^${base}//" | sed 's/^,//')
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 \
"$@"
set -x
exec "$@"

View file

@ -1,10 +1,6 @@
#!/usr/bin/env sh #!/usr/bin/env sh
set -x set -x
# What processor architecture to use
arch=$QEMUSH_ARCH
[ -z "$arch" ] && arch=$(uname -m)
# How many CPU cores to use # How many CPU cores to use
nproc=$QEMUSH_NPROC nproc=$QEMUSH_NPROC
[ -z "$nproc" ] && nproc=$(($(nproc) / 2)) [ -z "$nproc" ] && nproc=$(($(nproc) / 2))
@ -14,7 +10,7 @@ ram=$QEMUSH_RAM
[ -z "$ram" ] && ram=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K [ -z "$ram" ] && ram=$(($(free | grep '^Mem:\s' | awk '{ print $NF }') / 2))K
# Set the arguments # Set the arguments
set -- "qemu-system-${arch}" \ set -- qemu-system-x86_64 \
-enable-kvm \ -enable-kvm \
-M q35 \ -M q35 \
-cpu host -smp "$nproc" \ -cpu host -smp "$nproc" \