On Sep 22, 2014 4:07 PM, "Tobias Geerinckx-Rice" < tobias.geerinckx.r...@gmail.com> wrote: > > On 22 September 2014 07:57, Alexander Groleau <awg...@xbetanet.com> wrote: > > I have tried the following script as well during my adventures with no > > success: > > > > [Unit] > > Description=Start/Stop Libvirt Windows Guest > > Documentation=man:libvirtd(8) > > Documentation=http://libvirt.org > > After=libvirtd.service > > Manually ordering services with Before=/After= is usually a mistake. > Try using Requires= or BindTo= instead, and let systemd handle > ordering for you.
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. > > > [Service] > > ExecStart=/usr/bin/libvirt-windows.sh start > > ExecStop=/usr/bin/libvirt-windows.sh stop > > RemainAfterExit=yes > > Type=oneshot > > StandardOutput=journal+console > > > > [Install] > > WantedBy=multi-user.target > > > > This works for boot (my sh script is run right after libvirtd is started); > > however, the libvirtd daemon, started by libvirtd.service, is always > > terminated well before my sh is run on shutdown/reboot. > > I can't see any other obvious problems. This should just work, unless > something other than systemd is killing your libvirtd. > > Regards, > > T G-R > _______________________________________________ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- Mantas Mikulėnas
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel