@Robbie Williamson: Yes other distros have solved this. Like Arch. I switched my laptop to arch for that very reason.
With Arch, I first have my shares that I want connected in fstab. The Ubuntu documentation is ample on the subject.
Secondly, in Arch, netfs daemon is used to control connections to network shares. To avoid any problem, netfs can be managed by a script in /etc/NetworkManager/dispatcher.d/ which both starts and stops netfs according to the state of the connection. As follows:
#!/bin/sh
IF=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface
case "$STATUS" in
'up') # $IF is up
exec /etc/rc.d/netfs start
;;
'down') # $IF is down
exec /etc/rc.d/netfs stop
;;
esac
With such a setup, the shares are connected if there is a connection to the network and taken down with the connection. It is no longer a question of "timing" what comes first or second. Why Ubuntu couldn't carry such a solution is beyond me. This problem brought me to switch my laptop to Arch as no good solution was out there for Ubuntu. It's time developers looked at what others are doing or Ubuntu will loose more users on this issue.
@Robbie Williamson: Yes other distros have solved this. Like Arch. I switched my laptop to arch for that very reason.
With Arch, I first have my shares that I want connected in fstab. The Ubuntu documentation is ample on the subject.
Secondly, in Arch, netfs daemon is used to control connections to network shares. To avoid any problem, netfs can be managed by a script in /etc/NetworkMan ager/dispatcher .d/ which both starts and stops netfs according to the state of the connection. As follows:
#!/bin/sh
IF=$1 # The interface which is brought up or down
STATUS=$2 # The new state of the interface
case "$STATUS" in
'up') # $IF is up
exec /etc/rc.d/netfs start
;;
'down') # $IF is down
exec /etc/rc.d/netfs stop
;;
esac
With such a setup, the shares are connected if there is a connection to the network and taken down with the connection. It is no longer a question of "timing" what comes first or second. Why Ubuntu couldn't carry such a solution is beyond me. This problem brought me to switch my laptop to Arch as no good solution was out there for Ubuntu. It's time developers looked at what others are doing or Ubuntu will loose more users on this issue.