You are not logged in.
With the help of the arch wiki for network manager and this post: https://bbs.archlinux.org/viewtopic.php?id=83275 I was able to mount my network shares on boot with network manager dispatcher. The script the wiki says to use to dismount is this:
#!/bin/bash
umount -a -l -t cifs
Something in the wiki I didn't notice until I was almost done was this:
Note: Ever since NetworkManager 0.9.8, the 'pre-down' and 'down' actions are not executed on shutdown or restart, so the above script will only work if you manually disconnect from the network. See this bug report for more info.
As far as I can tell the bug report still active, I don't see that it's been closed or fixed. I haven't had my laptop freeze at shut down or reboot but I do notice it does take a bit longer to shut down now.
Is there a way to force my dismount script to run at shut down and reboot? Or somewhere else I can add a script to make sure network shares are dismounted at power down? Or do I not need to?
Offline
I'm not familiar with NetworkManager and it's peculiarities, but have you considered using network share automounting instead?
Offline
I'm not familiar with NetworkManager and it's peculiarities, but have you considered using network share automounting instead?
I did see that, I'll check into it a bit more. I decided to try the dispatcher because it would allow me to only mount when I was connected to a certain network(s). I'm running arch on my laptop and its the one that goes with me everywhere, so if I'm not on my home network auto mounting wouldn't work. If there's a way to have it not attempt to mount when I 'm not at home it may be an option.
Thank you for your input
Offline
I understand. In the case of AutoFS the automonting is performed on demand, when filesystem is accessed. So when you try to use it away from home your attempt will return 'No such file or directory' error. There's a few second timeout if a share fails to mount, but your boot & poweroff times should not be influenced.
Offline