Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Only mount SAMBA shares at home?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Thu May 22, 2008 8:18 pm    Post subject: Only mount SAMBA shares at home? Reply with quote

I have a couple of samba shares listed in /etc/fstab, so netmount tries to mount them on boot. That's great if I'm at home, but it seems netmount hangs if it can't find the shares (ie I'm somewhere else). I think it's a problem with cifs, but the solution should be to check if I'm at home before trying to mount the shares. Any non-hackish way to do this?

I can just hack the netmount init script to check my essid or something like that, but it feels hackish...
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Fri May 23, 2008 3:36 am    Post subject: Reply with quote

A common solution to this problem is to use the softlevel feature. Create one softlevel for home and another for everywhere else. Add netmount to the home softlevel, but not to the other softlevel.
Back to top
View user's profile Send private message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Fri May 23, 2008 4:02 am    Post subject: Reply with quote

How do I make it only load stuff in the new level I create when I'm at home?
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Fri May 23, 2008 6:15 am    Post subject: Reply with quote

for softlevel:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4

but really, noauto in fstab will stop them from loading,
and a softlevel "home" that has a service that only loads in home that will execute the mount commands would work
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
termite
Guru
Guru


Joined: 06 May 2007
Posts: 466

PostPosted: Fri May 23, 2008 1:20 pm    Post subject: Reply with quote

Ah, I see. Thank you :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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