View previous topic :: View next topic |
Author |
Message |
a_l_a_n n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 16 Dec 2006 Posts: 49
|
Posted: Sun Apr 01, 2007 10:32 am Post subject: Wired and Wireless: Probs w/ init scripts when eth0 unconnec |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
fidel Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/201960053043831fe4aa3c9.jpg)
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Sun Apr 01, 2007 11:31 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
a_l_a_n n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 16 Dec 2006 Posts: 49
|
Posted: Mon Apr 02, 2007 4:09 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ion Silverbolt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/18091071164f0ff5661fceb.gif)
Joined: 04 Nov 2004 Posts: 203
|
Posted: Mon Apr 02, 2007 8:50 pm Post subject: |
|
|
If it's udev trying to start an unused network connection, you can escape it by hitting CTRL+C. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|