04.03.2017 13:49, Peter Hoeg пишет:
> Hi,
> 
>> If I have a user service which needs to have the system database server
>> available: How do I construct a proper depend?
> 
> As Lennart was pointing out, the user and system instances do not know
> anything about each other, so you cannot.
> 

"You cannot because it is currently unimplemented", "you cannot because
we do not care but feel free to implement" or "you cannot because we
will never even consider it"?

> The 2 other options I can think of:
> 
> a) Run a system service specifying your user id in User=
> 

The problem has nothing to do with ownership so it won't help.

> b) Enable socket activation (if possible) on the system instance
> database. That way your user instance will simply wait on the socket
> until the server comes up.
> 

This means you need to set absurdly large TimeoutStart because you have
no idea when other service appears, so every time you attempt to start
service you will need to wait absurdly large time before proceeding with
error handling. Proper service dependency won't even attempt to start
dependent service until dependencies are known to run.

systemd already propagates some unit types (devices, mounts and swaps)
from system to user instance. Are there any fundamental problems that
prevent doing it for other types?
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to