Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wired and Wireless: Probs w/ init scripts when eth0 unconnec
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
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Sun Apr 01, 2007 10:32 am    Post subject: Wired and Wireless: Probs w/ init scripts when eth0 unconnec Reply with quote

I have a wired (eth0) and a wireless (wlan0) interface.

2 questions about booting when eth0 is not connected:

1. Is there anyway I can stop the delay caused by trying to get an IP from the unconnected eth0? i.e. Only run dhcpcd on the connected interfaces.

2. netmount (also ntpd and ntp-client) depends on "net". Apparently this virtual translates into a dependency on eth0. When eth0 is not plugged in netmount fails to start, even if wlan0 is up. Any way to make this dependency into eth0 OR wlan0?
Back to top
View user's profile Send private message
fidel
Guru
Guru


Joined: 16 Jul 2004
Posts: 407
Location: CH

PostPosted: Sun Apr 01, 2007 11:31 am    Post subject: Reply with quote

To your first question I might have an answer:
You can set udev to not try to boot your network interfaces by setting something to RC_PLUG_SERVICES, like:
Code:

RC_PLUG_SERVICES="!net.eth*"

Then udev does not launch your net.eth* devices, you could put something like RC_PLUG_SERVICES="!net.*" and none of your network devices get launched.
On the other hand you can configure your network devices in the famous /etc/conf.d/net, there are some nice options you can set:
Code:

# Net 0
modules_eth0=( "dhcpcd" )
config_eth0=( "dhcp" )
dhcpcd_eth0=( "-N -t 5 -G 192.168.1.1" )

-N is for not changing the ntp-server settings
-t is the one you want: set the time of waiting for a response from the dhcp server to 5 seconds (change to whatever you need)
-G is for setting the default gateway
You can use those settings for your wireless card as well.

After setting udev to not launch your network devices, you can easily add them yourself to the desired runlevel. So just run
Code:

# rc-update add net.eth0 default

To your second question I am asking myself, why your net.wlan0 is not considered as running network service... Normally, when net.wlan0 is running, you got network as well and ifconfig should give you a proper output...
Back to top
View user's profile Send private message
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Mon Apr 02, 2007 4:09 pm    Post subject: Reply with quote

Thanks. I tried what you suggested, but promptly undid it. It does seem to be a way to speed up the delay with acquiring an IP from a disconnected interface, but the configuration in /etc/conf.d/net scared me off ... If I dont understand things I like to leave them in their default state! I already have some stuff going on in there to get my wireless to work with wpa_supplicant and it was all starting to look a little dirty.

Thanks though.
Back to top
View user's profile Send private message
Ion Silverbolt
Apprentice
Apprentice


Joined: 04 Nov 2004
Posts: 203

PostPosted: Mon Apr 02, 2007 8:50 pm    Post subject: Reply with quote

If it's udev trying to start an unused network connection, you can escape it by hitting CTRL+C.
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