mercredi 25 mars 2015

How to Automount a CIFS share after WiFi connects on Raspbian


I've got Raspbian running on RaspberryPi 2. I've a WIFI dongle, configured network/interfaces to automatically connect to my home network... all works great.


I've a windows share on my LAN that I want to mount on raspbian. I edited /etc/fstab file. My added line works fine when I use Ethernet cable, it automatically mounts the share on boot. However, when on WiFi it doesn't. I'm guessing it runs fstab too early before the WiFi connects.... also if I run sudo mount -a, it reads the rule from fstab and applies it just fine...


My question is, how can I get the system to automount AFTER there is an available connection? or after it acquires an IP maybe?


I looked at udev rules but I'm not sure if that's the way to go...



Aucun commentaire:

Enregistrer un commentaire