On 02/24/2019 06:26:51 PM, Helmut Jarausch wrote:
Hi,
I have a lot of symlinks in my home directory like
$HOME/Python -> /Src/Python
Now, I'd like to not mount /Src on default.
How can I set up my system (using autofs ?) to automatically mount
/Src if such a symlink is accessed
like cd $HOME/Python
Since I didn't find a similar configuration on the net, I've come up
with the following solution (after some trial and error)
First, I've replaced all symlinks by empty directories of the same name.
My /etc/autofs/auto.master contains (the only uncommented line)
/- /etc/autofs/auto.local
and /etc/autofs/auto.local contains, e.g.
/Src -fstype=ext4,exec,suid,noatime :/dev/sdc3
/home/jarausch/Python -fstype=bind,exec,suid,noatime
:/Src/Src/Python
I hope this helps others,
Helmut