On Mon, Jul 27, 2015 at 10:51 AM, Lennart Poettering <lenn...@poettering.net> wrote: > > If you are looking for a way to start this service only when an NFS > mount is attempted, then I must disappoint you: there's currently no > way to do this nicely, as you can neither express "applies only to > NFS", nor is there a way to actively pull in things from remote > mounts.
Presumably if the .mount unit had Wants=nfs-common.target or something similar it would pull it in when it mounts, right? That would probably require a change to the generator to detect nfs shares and add this. Whether you want to do it that way is a different matter. > > (There's a reason for both limitations: we try to avoid pull-deps on > mounts, since we want to keep the effect of manually ordered > /bin/mount invocations, and systemd-ordered .mount activations as > close as possible.) > Would it actually affect ordering? If the mount wants nfs-common and is after remote-fs-pre.target, and nfs-common is before remote-fs-pre.target is after nfs-common, then won't nfs-common be started before any remote fs are mounted? The only change would be that the mount wants nfs-common, so that it is started when it otherwise might not have been. Or am I missing something? -- Rich _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel