USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Remount an SMB share after ACPI suspend/resume?

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Networking
View previous topic :: View next topic  
Author Message
samwichse
Member


Joined: 29 Aug 2024
Posts: 107

PostPosted: Tue Feb 09, 2024 5:07 pm    Post subject: Remount an SMB share after ACPI suspend/resume? Reply with quote

Is it possible to do this automatically. It seems a little tricky, as I'm trying to do this with a laptop remotely mounting my media server. Every time I close it though, it has to be manually remounted. And it's not like the network immediately returns either.

I guess ideally, every time I connect to my home network, I'd like for it to connect my SMB share automatically, but not if I connect to some other SSID/MAC combo.

Is this even possible?

Sam

PS: Long time no see, guys.


Back to top
View user's profile Send private message
tlmiller
Ultimate Member


Joined: 01 May 2024
Posts: 2434
Location: MD, USA

PostPosted: Wed Feb 10, 2024 12:50 am    Post subject: Reply with quote

I mount my smb shares with autofs, and a good 85% of the time, they automatically remount after resume.



_________________
Debian Squeeze, Arch, Kubuntu mostly. Some Mandriva. Some Windows.
Desktops: shadowdragon, medusa
Laptops: bluedrake, banelord, sandwyrm, aardvark.
Back to top
View user's profile Send private message AIM Address MSN Messenger
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Wed Feb 10, 2024 12:57 am    Post subject: Reply with quote

what are you using for the suspend/resume? What distro and network manager program (if any)?

Some of the utilities like hibernate have scripts that get run on suspend and on resume, I'm guessing you could add wireless reconnect + mounting instructions there

A bit more hacky feeling of a solution might just be some system daemon script that runs in the background and checks what network you're on and looks to see if your media server is mounted every minute / 5 minutes and then sleeps.

--edit
That autofs looks pretty cool too.



_________________
Main Desktops : Kubuntu 10.4. ArchLinux 64-bit. Windows7 64-bit. Windows XP 32-bit.

MacBook: OS X Snow Leopard (10.6)
Back to top
View user's profile Send private message
samwichse
Member


Joined: 29 Aug 2024
Posts: 107

PostPosted: Wed Feb 10, 2024 3:16 am    Post subject: Reply with quote

I'm running Fedora 12/XFCE/NetworkManager...

However, the act of asking gave me the answer I needed: autofs.

A quick google of autofs and wireless etc yielded this handy howto:

http://www.howtoforge.com/accessing_windows_or_samba_shares_using_autofs

The only thing missing was that you need to add your smb sharing server's ip to hosts to map the server name to its ip automagically.

Sam


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Networking All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse