On 2023-09-08 14:21:49 +0200, Michael Biebl wrote:
> If you have a custom mount setup, you should be able to tweak those unit
> files to your needs e.g. via RequiresMountsFor=

I had tried that in the past for apache2, but without any effect.
I suppose that the goal of the "RequiresMountsFor" seems to ask
for a mount whose goal is to make some path accessible, not to
wait for this path to actually be accessible. So this is useless
as the mount is automatic.

So, I think that the solution would be to modify user@.service
in order to wait for the homedir of the user to be available.
But IMHO, this should be done by default in systemd (on most
configurations, this will be some kind of no-op).

There might be the possibility to have something like

ExecStartPre=/bin/sh -c 'while [ ! -d $HOME ]; do sleep 5; done'

(ideally something using inotify when possible).

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to