# [resolved]why net.wlan0 was skiped by openrc?

## whiler

I need net.wlan0 start at boot. but I found it was skiped by openrc.  :Sad: 

this is the net.* links

```

~ # ls -l /etc/init.d/net.*

lrwxrwxrwx 1 root root     6 Aug 20 07:36 /etc/init.d/net.eth0 -> net.lo

-rwxr-xr-x 1  root root 17427 Aug 20 07:46 /etc/init.d/net.lo

lrwxrwxrwx 1 root root     6 Aug 20 07:36 /etc/init.d/net.wlan0 -> net.lo

```

this is tht rc-config

```

~ # rc-config list|grep -E "net\."

net.eth0                  default

net.lo                      boot

net.wlan0                 default

~ # ls -lh /etc/runlevels/default/

total 0

lrwxrwxrwx 1 root root 17 Aug 19 22:51 local -> /etc/init.d/local

lrwxrwxrwx 1 root root 20 Oct 22  2014 net.eth0 -> /etc/init.d/net.eth0

lrwxrwxrwx 1 root root 20 Aug 19 22:51 netmount -> /etc/init.d/netmount

lrwxrwxrwx 1 root root 21 Aug 20 07:52 net.wlan0 -> /etc/init.d/net.wlan0

lrwxrwxrwx 1 root root 16 Oct 22  2014 sshd -> /etc/init.d/sshd

```

and I add one line einfo "$@" in /etc/init.d/net.lo to print the log

```

~ # head /etc/init.d/net.lo

#!/sbin/runscript

# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>

# Released under the 2-clause BSD license.

einfo "$@"

MODULESDIR="/lib/netifrc/net"

MODULESLIST="${RC_SVCDIR}/nettree"

_config_vars="config routes"

```

then reboot, net.wlan0 does not work, and this is the log in rc.log

```

~ # grep -E "\/etc\/init\.d/net\." /var/log/rc.log

 * /etc/init.d/net.eth0

 * /etc/init.d/net.lo

 * /etc/init.d/net.eth0

 * /etc/init.d/net.lo

 * /etc/init.d/net.lo

 * /etc/init.d/net.eth0

```

this is my /etc/rc.conf.

```

~ # grep -E -v "^#" /etc/rc.conf |grep -v -E "^\s*$"

rc_shell=/sbin/sulogin

rc_depend_strict="NO"

unicode="YES"

rc_tty_number=12

rc_logger="YES"

```

why net.wlan0 was skiped by openrc?Last edited by whiler on Mon Oct 27, 2014 1:47 pm; edited 1 time in total

----------

## charles17

Do you just want a working and easy to set up network configuration or do you  really want »I need net.wlan0 start at boot«?

Have a look at https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD

Regarding wlan0, did you check it's really "wlan0" and not renamed like  *Quote:*   

> $ dmesg | grep 'network interface'
> 
> [    8.480264] systemd-udevd[268]: renamed network interface eth0 to enp2s14
> 
> [    8.492263] systemd-udevd[268]: renamed network interface wlan0 to wlp8s0

 

----------

## whiler

Thanks.

I found the reason why net.wlan0 was skipped by openrc. I have a deprecated config in /etc/conf.d/net about wlan0. After remove these lines, the net.wlan0 works fine.

This is my /etc/conf.d/net

```

#modules="wpa_supplicant"

config_eth0="dhcp"

#rc_net_wlan0_need="wpa_supplicant"

#wpa_supplicant_wlan0="-D wext -d -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf"

wpa_supplicant_wlan0="-D wext"

config_wlan0="dhcp"

```

 *charles17 wrote:*   

> 
> 
> Do you just want a working and easy to set up network configuration or do you  really want »I need net.wlan0 start at boot«?
> 
> Have a look at https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD
> ...

 

----------

## whiler

Manual link /etc/init.d/net.wlan0 to /etc/init.d/net.lo and link /etc/runlevels/default/net.wlan0 to /etc/init.d/net.wlan0 without update the openrc deptree located at /lib/rc/cache is the reason why net.wlan0 was skipped.

This is command update the openrc deptree.

```

rc-update --update

```

ref:http://www.funtoo.org/Package:OpenRC section caching

----------

