I run a script named 02cifs.sh (placed in /etc/NetworkManager/dispatcher.d/) to mount and unmount cifs shares when wireless network goes up or down.
Mounting works fine but all shares do not unmount when wireless disconnects. I have 3 cifs shares. Only 1 unmounts and the rest get stuck because the network is already disconnected.
if [ "$IF" == "wlan0" ]
case "$2" in
logger -s "Network File Systems mounted"
/etc/mountcifs.sh #contains mount commands for all shares
logger -s "Network File Systems unmounted"
umount -a -t cifs
Running umount -a -t cifs from command line while the network is connected works well. Anybody got a working solution?