[Spice-devel] [PATCH linux vdagent 1/2] systemd: use "After" with "Requisite"

Jonathon Jongsma jjongsma at redhat.com
Wed Nov 29 16:44:45 UTC 2017


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 <jjongsma at 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



More information about the Spice-devel mailing list