I am using a laptop that uses DHCP for both my eth0 and wlan0 connections.
Sometimes, I only use the wlan0 connection, and other times the eth0 connection.
The problem is that when I do not have the eth0 connection physically plugged in, the bootup process stops for a LONG time (2-3 minutes)on trying to get a DHCP address on the eth0 connection that is not connected. I am currently disabling/enabling the lan card in BIOS before I boot, but that is a pain.
Setting eth0 to a static IP is not an option. (I connect to multple LANs, some of which I do not have ANY info for)
Also, more often than not, wlan0 does not get initialized, so I have to:
Code:
# ifconfig wlan0 up
# dhcpcd wlan0
to get a wireless connection.
I was wondering:
- Is there a way to get a interactive script written that asks if you want eth0 to get a dhcp address during each boot and to get wlan0 started, if needed? (Example: A: eth0 B: wlan0 C: No LAN)
- What would such a script look like?
- Where would be the best place to call the script from? (I'm assuming /etc/rc.d/rc.inet1 or /etc/rc.d/rc.inet2)
I am aware that I would have to enter in a choice during the boot for this to work. That does not bother me. It is better than what is going on at the moment.
Thank you for giving me ideas on this.
Running 10.2 (Not current!), kernel 2.6.15
Intel 10/100 ethernet
D-Link DWL-650 P1 wireless pcmcia card