diff --git a/rootfs/init b/rootfs/init index ac25155..504f3d0 100755 --- a/rootfs/init +++ b/rootfs/init @@ -44,13 +44,22 @@ if [ -n "$audio_model" ] ; then fi export XDG_CONFIG_HOME='/tmp' pa_args=$'-audiodev\npa,id=qemupa,server=unix:/tmp/pa.sock'$model_args; - pulseaudio --use-pid-file=no --daemonize=no --exit-idle-time=-1 -n \ - -L "module-native-protocol-unix auth-anonymous=1 socket=/tmp/pa.sock" \ - -L "module-always-sink" \ - -L "module-always-source" \ - -L "module-null-sink" \ - -L "module-null-source" \ - -L "module-vchan-sink domid=$domid" & + if [ "$domid" -ge 0 ]; then + pulseaudio --use-pid-file=no --daemonize=no --exit-idle-time=-1 -n \ + -L "module-native-protocol-unix auth-anonymous=1 socket=/tmp/pa.sock" \ + -L "module-vchan-sink domid=$domid" \ + -L "module-always-sink" \ + -L "module-always-source" \ + -L "module-null-sink" \ + -L "module-null-source" & + else + pulseaudio --use-pid-file=no --daemonize=no --exit-idle-time=-1 -n \ + -L "module-native-protocol-unix auth-anonymous=1 socket=/tmp/pa.sock" \ + -L "module-always-sink" \ + -L "module-always-source" \ + -L "module-null-sink" \ + -L "module-null-source" & + fi fi # Extract network parameters and remove them from dm_args