I'm setting up my machine to connect to network share resources at the place I work (there are NFS shares and SMB shares). This access is only possible through VPN. So my question is, Is there a way to get OSX to only attempt to automount an NFS or SMB share if it is connected through VPN?
Nfs – Mounting an NFS or SMB share onto OSX only while connected to VPN
mac-osxnfsserver-message-blockvpn
Best Answer
Mac OS X has autofs, which, by default, is configured to do NFS automounts under
/net
. So you should be able to justcd /net/$hostname/$share
.