'Twas brillig, and Patrick Donnelly at 15/02/13 20:44 did gyre and gimble: > I am trying to setup a mount unit file for an NFS mount. I'm using > (with IP address hidden): > > # cat host\@.mount > [Unit] > Description=%i mount > DefaultDependencies=no > Requires=local-fs.target network.target rpc-statd.service > Conflicts=umount.target > > [Mount] > What=host:/%i > Where=/%i > Type=nfs > Options=user,async,atime,exec,rw,wsize=32768,rsize=32768 > DirectoryMode=0755 > TimeoutSec=20 > > [Install] > WantedBy=multi-user.target > > > When trying to enable the mount unit, I get this error: > > # systemctl enable ./host\@mnt.mount > Failed to issue method call: Invalid argument
Don't use the paths ./ as a prefix. Just ensure your unit is located in /etc/systemd/system and do: systemctl enable [email protected] No need to escape anything. > This error message is unfortunately (and frustratingly) vague. What am > I doing wrong? > > [Before someone asks why not use /etc/fstab, I'm planning to add an > openvpn dependency when I get these issues sorted out.] Can't you just make openvpn.service also part of network.target? Thus holding up network.target until after it's started and thus delaying the mount until that point (even when the mount is generated from fstab). Alternatively, would it make sense to teach the fstab generator some kind of x-system-* option (or comment= syntax) to allow -after or -requires deps to be specified. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
