Following "man NetworkManager" /etc/NetworkManager/dispatcher.d/ hooks creation. I made a rough (read: suboptimal) hook to make NetworkManager to restart netmount service every time a new network connection is made. Of course there's a lot of room for improvements because the attached script is a WORKSFORME one. Lazy NetworkManager users will be happy to see some better integration by the way (with better > almost nothing). Just place the attached file into that dir and restart NetworkManager. In "sabayon" overlay there's a patched networkmanager version containing that "fix". Reproducible: Always Steps to Reproduce:
Created attachment 215188 [details, diff] NetworkManager up-down script
Created attachment 220897 [details] new NetworkManager nfs script After some testing, I realized that the currently attached script causes issues when nfs shares are not available and suspend-to-ram requests apparently because socket used by nfs is blocking (and kernel complains about it aborting STR). So I made a (probably) even more rough version of it which works independently from netmount. Comments? Rants?
why exactly do you want netmount restarted when reconnecting ? sounds like a terrible idea to me. i move between WAPs and wired systems and dont need to restart netmount when i'm on the same LAN. all my NFS/CIFS mounts work fine. obviously moving between LANs wouldnt work, but neither would restarting the init.d script.
It works pretty well here when moving between different LANs. If you have a better solution to deal with NFS blocking sockets, just write it here. Fact is: we have a problem that could lead user application to dead lock.
This should be fixed in latest 0.9.x versions in the tree