Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[resolved]why net.wlan0 was skiped by openrc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
whiler
n00b
n00b


Joined: 18 Apr 2014
Posts: 3
Location: China

PostPosted: Sat Oct 25, 2014 5:50 pm    Post subject: [resolved]why net.wlan0 was skiped by openrc? Reply with quote

I need net.wlan0 start at boot. but I found it was skiped by openrc. :(
this is the net.* links
Code:

~ # 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
Code:

~ # 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
Code:

~ # 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
Code:

~ # 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.
Code:

~ # 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
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Sun Oct 26, 2014 8:54 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
whiler
n00b
n00b


Joined: 18 Apr 2014
Posts: 3
Location: China

PostPosted: Mon Oct 27, 2014 1:45 pm    Post subject: Reply with quote

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
Code:

#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

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

Back to top
View user's profile Send private message
whiler
n00b
n00b


Joined: 18 Apr 2014
Posts: 3
Location: China

PostPosted: Tue Oct 28, 2014 3:05 pm    Post subject: without update the openrc deptree located at /lib/rc/cache Reply with quote

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.
Code:

rc-update --update


ref:http://www.funtoo.org/Package:OpenRC section caching
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum