Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nfs on notebooks
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Wed Apr 10, 2013 8:57 am    Post subject: nfs on notebooks Reply with quote

Hi,

I am responsible for an environment with Gentoo-Desktops with nfs-mounted homes. Now I have to install some notebooks such that they are able to run autonomously with a guest-user if there is only a wlan connection and run like a common desktop with nfs-mounted homes if there is a lan connection up. Only in the latter case the box should attempt to mount the homes. As far as I understand udev should in some way do the trick. Unfortunately I am not familiar enough with udev to figure out how. Can anybody here give me a hint?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Wed Apr 10, 2013 9:37 am    Post subject: Reply with quote

Openrc at work for that.

You just add your home mount after the net.eth0 (stupid new udev naming scheme, how should we speak about the first card now !) is loaded. The post-up step.

Search the forum for post-up example, or dig openrc manual.
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Wed Apr 10, 2013 7:39 pm    Post subject: Reply with quote

krinn wrote:
Openrc at work for that.

You just add your home mount after the net.eth0 (stupid new udev naming scheme, how should we speak about the first card now !) is loaded. The post-up step.

Search the forum for post-up example, or dig openrc manual.

Thanks for the hint. If I did understand the concept right something like this should work:

# /etc/fstab
nfs-server:/home /home nfs noauto,defaults 0 0

#/etc/conf.d/net

postup() {

if [ ${IFVAR} == 'eth0' ] ; then

mount /home

fi

}

postup is called whenever a network interface is brought up automatically. Right?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Wed Apr 10, 2013 8:12 pm    Post subject: Reply with quote

right, so something you can get up by just plug-in the cable. See sys-apps/ifplugd working fine here.

edit: just to add, watch out with "eth0" interface name with udev-200, it has change, read the news for more info. With udev < 200 or other eth0 is fine.
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Wed Apr 10, 2013 9:15 pm    Post subject: Reply with quote

krinn wrote:
right, so something you can get up by just plug-in the cable. See sys-apps/ifplugd working fine here.

edit: just to add, watch out with "eth0" interface name with udev-200, it has change, read the news for more info. With udev < 200 or other eth0 is fine.

Empty 80-net-name-slot.rules is present here, so udev is respecting eth0. I will keep it this way as long it will work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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