The "Requisite" directive is intended to require that the virtio port
device exists before starting the vdagent socket unit. If the device
does not exist, the socket should fail to start. However, without using
"After", the socket will still start even when the device is not
present.

See https://github.com/systemd/systemd/issues/4756 for further details
(particularly the following comment:
https://github.com/systemd/systemd/issues/4756#issuecomment-267005324)

Signed-off-by: Jonathon Jongsma <jjong...@redhat.com>
---
 data/spice-vdagentd.socket | 1 +
 1 file changed, 1 insertion(+)

diff --git a/data/spice-vdagentd.socket b/data/spice-vdagentd.socket
index e34a188..613c7ed 100644
--- a/data/spice-vdagentd.socket
+++ b/data/spice-vdagentd.socket
@@ -2,6 +2,7 @@
 Description=Activation socket for spice guest agent daemon
 # only start the socket if the virtio port device exists
 Requisite=dev-virtio\x2dports-com.redhat.spice.0.device
+After=dev-virtio\x2dports-com.redhat.spice.0.device
 
 [Socket]
 ListenStream=/var/run/spice-vdagentd/spice-vdagent-sock
-- 
2.13.6

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to