Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Network config when link is up.
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
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 590

PostPosted: Tue Dec 02, 2008 6:42 am    Post subject: [SOLVED] Network config when link is up. Reply with quote

I use my laptop on wlan and sometimes on wired net. My companys dhcp takes about 12 seconds to answer (some windows machine) so I cannot adjust the timeout on the dhcp. Is there a way to skip dhcp when media is not up!?

Last edited by bastibasti on Wed Dec 03, 2008 7:00 am; edited 1 time in total
Back to top
View user's profile Send private message
lookitsme
n00b
n00b


Joined: 06 Nov 2003
Posts: 48
Location: Kuala Lumpur, Malaysia

PostPosted: Tue Dec 02, 2008 8:25 am    Post subject: Reply with quote

I'm using preup and ethtool in /etc/conf.d/net as follows:

preup() {
# Test for link on the interface prior to bringing it up. This
# only works on some network adapters and requires the ethtool
# package to be installed.
if ethtool "${IFACE}" | grep -q 'Link detected: no'; then
ewarn "No link on ${IFACE}, aborting configuration"
return 1
fi
}

That should do what you want...
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Tue Dec 02, 2008 9:01 am    Post subject: Reply with quote

If you install sys-apps/netplug network interfaces won't be brought up until they are plugged in. No configuration is required beyond installing the package, as Gentoo's net-scripts already know about it.
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
bastibasti
Guru
Guru


Joined: 27 Nov 2006
Posts: 590

PostPosted: Wed Dec 03, 2008 7:00 am    Post subject: Reply with quote

I tried ipflugd, it works like a charm. Thank you!!

@lookitsme: Thanks for your preup script i had to add a sleep 2 to the beginning, the nic on this machine is very lame :-))
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