I was also having a problem with the Shutdown / Reboot sequence taking ages due to using WiFi, WPA2 and mounting SMB shares.
I wasted about 4 hours digging around before I finally realised that the solution involved Upstart.
1. Open a terminal and enter:
Code:
sudo gedit /etc/init/network-manager.conf
2. Just below the description line add the following:
Code:
pre-stop script
/etc/init.d/umountnfs.sh
end script
3. Save the script and attempt a restart.
I don't know if this will work for everyone, or even what version of Upstart you need for it to work, but it cuts my shutdown time from about 2 mins to about 30 seconds.
Note: This has been working for me about 90% of the time.
Occasionally though I see that the script ends prematurely due to the TERM signal and I end up with the 2 minute wait again.
I've added the following to the /etc/init/network-manager.conf file:
Code:
pre-stop script
trap "Caught TERM Signal" TERM
/etc/init.d/umountnfs.sh
trap - TERM
end script
Not sure if it works, but I haven't seen the TERM error yet.
Bookmarks