fstab entries with remote mounts

I have numerous remote mounting points in my /etc/fstab and these work fine when I'm at home, however when I'm away they obviously do not work so get errors while booting. Is there any way to amend these entries so that mounts are not attempted when I'm away or should I use an /etc/fstab.home and /etc/fstab.away?
 
I do not understood clearly how you can tell the system that you are away or not; btw:

Defines the suitable mountpoints as noauto in fstab, so that they will not be mounted automatically at boot time.
Then, write a rc(8) script that will mount these manually. Call this script when you are at home, may be using sysrc(8) to toggle this option.
 
I have numerous remote mounting points in my /etc/fstab and these work fine when I'm at home, however when I'm away they obviously do not work so get errors while booting.
Sounds like you want "on-demand" mounted filesystems, which can be achieved by using autofs(5). That's what I'd try: remote's won't be mounted unless you actually change to the right (virtual) mountpoint / directory.
 
You did not inform the file system type. In the case of NFS mounts by the way of /etc/fstab, besides failok like Phishfry suggested, we need to specify retrycnt=1, otherwise /etc/rc.d/mountcritremote would try forever, each try having a timeout of 60 s.
 
Back
Top