1 |
On 02/24/2019 06:26:51 PM, Helmut Jarausch wrote: |
2 |
> Hi, |
3 |
> |
4 |
> I have a lot of symlinks in my home directory like |
5 |
> |
6 |
> $HOME/Python -> /Src/Python |
7 |
> |
8 |
> Now, I'd like to not mount /Src on default. |
9 |
> |
10 |
> How can I set up my system (using autofs ?) to automatically mount |
11 |
> /Src if such a symlink is accessed |
12 |
> like cd $HOME/Python |
13 |
> |
14 |
|
15 |
Since I didn't find a similar configuration on the net, I've come up |
16 |
with the following solution (after some trial and error) |
17 |
|
18 |
First, I've replaced all symlinks by empty directories of the same name. |
19 |
|
20 |
My /etc/autofs/auto.master contains (the only uncommented line) |
21 |
|
22 |
/- /etc/autofs/auto.local |
23 |
|
24 |
and /etc/autofs/auto.local contains, e.g. |
25 |
|
26 |
/Src -fstype=ext4,exec,suid,noatime :/dev/sdc3 |
27 |
|
28 |
/home/jarausch/Python -fstype=bind,exec,suid,noatime |
29 |
:/Src/Src/Python |
30 |
|
31 |
|
32 |
I hope this helps others, |
33 |
Helmut |