I have a laptop and NAS. What I want to do is to mount my NAS only when my wireless is connected, and umount it at wireless disconnected.
I have written both scripts I wat to run- they check the name of the connection and connect or disconnect. I have added the connect and disconnect scripts to to /etc/network/if-up.d and /etc/network/if-down.d.
The script which starts at if-up works correctly, the other one not- it will simply not umount. I thing the script executes when the wireless is already disconnected.
I want a way to run the script pre-disconnecting the wireless.
I used to do this with wicd in Kubuntu 11.04, but it seems too buggy now.
