From 55b0f56fb657fcfad34afbdb8cc04f3c3c55595b Mon Sep 17 00:00:00 2001 From: Ahurac Date: Sat, 9 Mar 2024 23:32:06 +0100 Subject: [PATCH] =?UTF-8?q?launchers/virtiofs=20:=20mise=20=C3=A0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qemu/launchers/virtiofs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/qemu/launchers/virtiofs b/qemu/launchers/virtiofs index 8b12cc1..fb597c7 100755 --- a/qemu/launchers/virtiofs +++ b/qemu/launchers/virtiofs @@ -1,7 +1,15 @@ #!/bin/sh -x -exec "${QEMUSH_BASE}" \ - -chardev socket,id=char0,path=/run/virtiofsd.sock \ +base=$(echo "$QEMUSH_BASE" | cut -d , -f 1) +QEMUSH_BASE=$(echo "$QEMUSH_BASE" | sed "s/^${base}//" | sed 's/^,//') + +. /run/runit/service/virtiofsd/conf + +if [ -S "$socket" ]; then set -- \ + -chardev socket,id=char0,path="${socket}" \ -device vhost-user-fs-pci,chardev=char0,tag=shared \ -object memory-backend-memfd,id=mem,size="${QEMUSH_RAM}",share=on \ -numa node,memdev=mem \ - "$@" + "$@" +fi + +exec "$base" "$@"