# [SOLVED] LAN and WiFi must both be up for services to start

## rbergen

I've been struggling with this problem for a long time now, all the time feeling stupid in anticipation for the simple solution I am sure must exist, but I just can't seem to find. I hope someone here can tell me what I've been overlooking.

I have a laptop with both a wired (eth0) and a wireless (wlan0) network card built in, the drivers for both of which I have compiled into the kernel. Both cards work fine. I have also installed ifplugd, configured both cards to use DHCP and added both net.eth0 and net.wlan0 to the default runlevel, along with a number of network services such as sshd. 

As both network cards provide "net", I would expect that the various network services would start as soon as one of the network cards has a working connection. So, if I start the laptop with no UTP cable connected to the port of the wired network card, I would expect sshd would start as soon as the wireless card acquires an IP address from my DHCP server. However, this is not what happens: in actual fact, both network cards need to be configured with an IP address before the network services start (the message at boot is "WARNING: <service> is scheduled to start when net.eth0, net.wlan0 has started").

I can circumvent the problem by not starting the network card that I know not to be "connected" at boot, which basically means the wired network card, but that kind of defeats the purpose of using ifplugd: I want to be able to make network connections with either card (depending on which connection type happens to be available at the place I decide to fire up the laptop) without having to log in and manually stop and start network interface and network service scripts.

Again, I'm sure there must be a very simple solution to this, but I've given up on finding it myself. 

Any help towards pointing me in the righting direction is greatly appreciated.

Thanks in advance,

RutgerLast edited by rbergen on Fri Sep 16, 2011 10:11 am; edited 1 time in total

----------

## Veldrin

have a look at RC_NET_STRICT_CHECKING in /etc/conf.d/rc

I guess setting it to no, fixes your problem

V.

----------

## DONAHUE

take a look at /etc/rc.conf which says: *Quote:*   

> # Do we allow any started service in the runlevel to satisfy the dependency
> 
> # or do we want all of them regardless of state? For example, if net.eth0
> 
> # and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
> ...

 You may have uncommented rc_depend_strict="YES" .

Veldrin's answer is appropriate if you are not yet using openrc/baselayout2. It may be appropriate if you are and have not removed /etc/conf.d/rc

----------

## rbergen

Thank you both very much for replying, and thank you Donahue for providing me with the solution.

At least I was right about a) the solution being simple and b) me feeling stupid for not finding it...

----------

