[systemd-devel] fstab generator and nfs-client.target

Lennart Poettering lennart at poettering.net
Mon Jul 27 08:36:49 PDT 2015


On Mon, 27.07.15 15:19, Felipe Sateler (fsateler at debian.org) wrote:

> On Mon, 27 Jul 2015 16:51:02 +0200, Lennart Poettering wrote:
> 
> > Coming back to your original question, there are two options:
> > 
> > 1) nfs-common becomes a normal multi-user.target service, but adds
> >    Before=remote-fs-pre.target. This way, the service is started at
> >    boot, and not only on first use.
> 
> This would have the side effect of nfs-common not being started in single 
> user mode, which is not likely to be the wanted outcome.

Well, then set DEfaultDEpendencies=no and pull it in by
sysinit.target. But that's only OK if the service is capable of
running in early-boot mode (i.e does not try to access /var and stuff).

> > 2) nfs-common makes itself pulled in by network-online.target, and
> >    orders itself before that. This way, the service is started when the
> >    network is upped.
> 
> Why isn't WantedBy=remote-fs.target an option? This would make any auto 
> remote mount pull nfs-common, but if none is then it won't be started 
> (unless that part of local-fs doesn't apply to remote-fs). 

Remote mount units do not pull that in. you can use it to mount all
remote mounts, but the remote mounts will not pull it in, the
dependency is only one way.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list