On 19.10.2015 19:27, Hans de Goede wrote: > Hi, > > On 19-10-15 16:55, poma wrote: >> >> While testing, I came to the same conclusion as Marc-André - commit 1587063. >> >> Hans, why the complexity of the "rules & target", isn't "ConditionPath*" sufficient? >> Besides, the lack of "WantedBy=multi-user.target" - back and forth with 'graphical.target' - 'spice-vdagentd' is "lost". >> >> Obviously X session (e.g. w/ 'startxfce4') can also start within 'multi-user.target', >> so why start 'spice-vdagentd' manually, unnecessarily, when sufficient is to append "multi-user.target", i.e. >> "WantedBy=spice-vdagentd.target multi-user.target" >> >> >> Simplifies start-up scheme and makes 'spice-vdagentd' more accessible as service. >> >> Tested-by: poma <pomidorabelisima@xxxxxxxxx> > > Nack, the spice-vdagent is a hardware service (even if it is virtual hardware), > systemd has a well-documented standard mechanism for hardware activation, and that is > what is being used. Using ConditionPathIsSymbolicLink is just a hack to achieve more > or less the same (mostly less, e.g. if the port ever becomes a hotplugable device > in the future the hack will not work). > > Regards, > > Hans > Right! http://man7.org/linux/man-pages/man7/daemon.7.html - Device-Based Activation - http://0pointer.de/blog/projects/socket-activation2.html - Hardware Activation in Detail - But still need constant availability - hence the term "service", in both directions: graphical.target <-> multi-user.target So spice-vdagentd.service here, is composed as follows: [Unit] Description=Agent daemon for Spice guests After=dbus.target ConditionPathIsSymbolicLink=/dev/virtio-ports/com.redhat.spice.0 [Service] Type=forking EnvironmentFile=-/etc/sysconfig/spice-vdagentd ExecStartPre=/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS PIDFile=/var/run/spice-vdagentd/spice-vdagentd.pid PrivateTmp=true [Install] WantedBy=spice-vdagentd.target multi-user.target "ConditionPathIsSymbolicLink" is a check, so the service will not re/start if there is no point. _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel