[systemd-devel] Suppressing automounting
Lennart Poettering
lennart at poettering.net
Wed Oct 22 11:55:30 PDT 2014
On Fri, 12.09.14 15:25, Dale R. Worley (worley at alum.mit.edu) wrote:
> > From: Tobias Geerinckx-Rice <tobias.geerinckx.rice at gmail.com>
>
> > Step back, and define exactly what it is you actually need^Wwant to do.
>
> For a certain entry in /etc/fstab (which will in practice always have
> the option "nofail"), if the device is not available "until booting is
> over" (which I'm willing to denote with a specified period of time),
> after that, it will not be automatically mounted if it becomes
> available.
This is currently not available, and it sounds very special and racy
to support it upstream I think. Sorry!
If you want to hack something up like this, I'd recommend writing a
timer unit/cronjob that creates a file $PATH after $SECONDS after boot. Then, add
a drop-in file to /etc/systemd/system/$MOUNTUNIT.d/foobar.conf, and
write into it:
[Unit]
ConditionFileExists=!/the/file/you/create
That way the mount unit will always be queued, but will actually be
conditionalized out $SECONDS after boot, if you follow what I mean.
Hope this is helpful.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list