<p dir="ltr"><br>
On Sep 22, 2014 4:07 PM, "Tobias Geerinckx-Rice" <<a href="mailto:tobias.geerinckx.rice@gmail.com">tobias.geerinckx.rice@gmail.com</a>> wrote:<br>
><br>
> On 22 September 2014 07:57, Alexander Groleau <<a href="mailto:awgneo@xbetanet.com">awgneo@xbetanet.com</a>> wrote:<br>
> > I have tried the following script as well during my adventures with no<br>
> > success:<br>
> ><br>
> > [Unit]<br>
> > Description=Start/Stop Libvirt Windows Guest<br>
> > Documentation=man:libvirtd(8)<br>
> > Documentation=<a href="http://libvirt.org">http://libvirt.org</a><br>
> > After=libvirtd.service<br>
><br>
> Manually ordering services with Before=/After= is usually a mistake.<br>
> Try using Requires= or BindTo= instead, and let systemd handle<br>
> ordering for you.</p>
<p dir="ltr">Neither Requires nor BindsTo imply any ordering though. So that might in fact *create* race conditions, if both A and B start at once, but A already expects B to be available.</p>
<p dir="ltr">><br>
> > [Service]<br>
> > ExecStart=/usr/bin/libvirt-windows.sh start<br>
> > ExecStop=/usr/bin/libvirt-windows.sh stop<br>
> > RemainAfterExit=yes<br>
> > Type=oneshot<br>
> > StandardOutput=journal+console<br>
> ><br>
> > [Install]<br>
> > WantedBy=multi-user.target<br>
> ><br>
> > This works for boot (my sh script is run right after libvirtd is started);<br>
> > however, the libvirtd daemon, started by libvirtd.service, is always<br>
> > terminated well before my sh is run on shutdown/reboot.<br>
><br>
> I can't see any other obvious problems. This should just work, unless<br>
> something other than systemd is killing your libvirtd.<br>
><br>
> Regards,<br>
><br>
> T G-R<br>
> _______________________________________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br></p>
<p dir="ltr">-- <br>
Mantas Mikulėnas</p>