services: qemu-guest-agent: Fix arguments to qemu-ga.

Fix the check for empty device path. Do not use --daemonize, since that is
handled by make-forkexec-constructor. Drop the --pidfile option which is
unused without --daemonize.

* gnu/services/virtualization.scm (qemu-guest-agent-shepherd-service): Modify
command arguments.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Timotej Lazar 2022-07-28 17:03:25 +02:00 committed by Ludovic Courtès
parent bc03aa438b
commit ee199cd3ba
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -879,13 +879,11 @@ (define (qemu-guest-agent-shepherd-service config)
(provision '(qemu-guest-agent))
(documentation "Run the QEMU guest agent.")
(start #~(make-forkexec-constructor
`(,(string-append #$qemu "/bin/qemu-ga") "--daemon"
"--pidfile=/var/run/qemu-ga.pid"
"--statedir=/var/run"
,@(if #$device
(list (string-append "--path=" #$device))
'()))
#:pid-file "/var/run/qemu-ga.pid"
`(,(string-append #$qemu "/bin/qemu-ga")
"--statedir" "/var/run"
,@(if (string-null? #$device)
'()
(list "--path" #$device)))
#:log-file "/var/log/qemu-ga.log"))
(stop #~(make-kill-destructor))))))