On Thu, Sep 24, 2015, 09:40 Luca Bertoncello <l.bertonce...@queo-group.com> wrote:
> Hi Lennart, > > thank you for your answer! > > > There is no concept of "first" or "last" in systemd, since it's not > clear what > > that's supposed to mean if there are multiple, and what happens if some > > operation results in activation? > > That's bad... :) > > > Hence, simply order your service against the services it requires. If > you want > > to just run some code when shutting down, make it a service with > > Type=oneshot and RemainAfterExit=yes, give it an empty ExecStart=, but > > specify ExecStop= to whatever it's supposed to do. Then order it *after* > the > > services that it shall be able to use, as the shutdown order in systemd > is > > always the inverse of the startup order, and what you specify via After= > and > > Before= specifies the startup order. > > Well, this is what I tried for more the three days... :( > I know, that the script need at least vdsmd.service, vdsm-network.service > and libvirtd.service. > But it needs that the tmpfs-partition /run is mounted, too. > I didn't found any service or target that mount/unmount /run. How can I > specify it? > Well it's not a target nor a service – it's a mount. Therefore "Requires=run.mount". However /run will always be available on systemd systems, anyway. (That's basically the whole point of /run…)
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel