# OpenRC and network interfaces (SOLVED)

## Akaihiryuu

I am almost done getting my new server set up, but I am having issues with it starting network interfaces and services in the wrong order.  Let me describe my setup a little first:

net.br0 = this contains net.eth0 (LAN) and net.wlan0 (wireless), as a bridge

eth0 and wlan0/hostapd NEED to be started before the bridge is created, or it won't work (wlan0 can't be bridged until it is in master mode)

I need most services that depend on "net" to need this one started first.  All local services basically

net.eth1 = this is the internet interface

I need things that depend on internet working (example: ntp-client) to wait for this one to come up first.

Due to my setup, I HAVE to set rc_strict_net_checking in rc.conf to no.  I don't want all my internal services dropping if my internet goes down.  The problem I'm having is, first it is trying to start net.br0 before eth0 and wlan0/hostapd are up.  This obviously causes nothing to work properly, until I log in as root and manually start things in the right order.  Also, it is trying to start ntp-client before my internet is up, causing it to not work.

Is there a way I can set individual services and interfaces to depend on different things (example: ntp-client depends on net.eth1, but internal services like DHCP and Samba depend on br0 which in turn depends on eth0 and wlan0/hostapd), so that things get started in the proper order?  I didn't have these kinds of problems before OpenRC...in a lot of ways OpenRC seems like it's a huge step backward in useability, even if it is a forward step in compatibility and design.  I am hoping I can do this with stragetically placed need options in conf.d/net and maybe a couple other places.

----------

## Akaihiryuu

I fixed this by putting RC_BEFORE="net.br0" in /etc/conf.d/hostapd and RC_NEED="net.eth1" in /etc/conf.d/ntp-client.

----------

