[systemd-devel] Can a systemd --user instance rely on After= of systemd --system instance?
hurikhan77 at gmail.com
Fri Mar 3 20:46:11 UTC 2017
Am Sun, 26 Feb 2017 21:35:27 +0100
schrieb Lennart Poettering <lennart at poettering.net>:
> On Sat, 25.02.17 17:34, Patrick Schleizer
> (patrick-mailinglists at whonix.org) wrote:
> > Hi,
> > I read, that a systemd --user instance cannot use Requires=.
> > But what about After=? Can a systemd --user instance use
> > After=some-system.service?
> The units of the --user instance live in an entirely disjunct
> namespace from those in the --system instance. Hence yes, you can
> absolutely use After= and/or Requires= between two user services, but
> it will always just be between two *user* services, and never between
> a user and a system service, since the unit state engines of the
> system and user instance are completely disconnected, as said.
Which brings me back to something I wondered about:
If I have a user service which needs to have the system database server
available: How do I construct a proper depend?
Currently, my user services time out during boot because the database
server is simply not ready fast enough. Thus I'd like to trigger
starting those services only after the database server is ready.
Even putting "Requires" and "After" into the user@ template doesn't
seem to respect this... (or I'm missing some secondary dependency)
My next attempt would be to fire up user sessions with a timer only
after a certain time has passed after boot. But that doesn't feel
Replies to list-only preferred.
More information about the systemd-devel