View previous topic :: View next topic |
Author |
Message |
whiler n00b
Joined: 18 Apr 2014 Posts: 3 Location: China
|
Posted: Sat Oct 25, 2014 5:50 pm Post subject: [resolved]why net.wlan0 was skiped by openrc? |
|
|
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 |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Sun Oct 26, 2014 8:54 am Post subject: |
|
|
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 |
|
|
whiler n00b
Joined: 18 Apr 2014 Posts: 3 Location: China
|
Posted: Mon Oct 27, 2014 1:45 pm Post subject: |
|
|
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 |
|
|
whiler n00b
Joined: 18 Apr 2014 Posts: 3 Location: China
|
Posted: Tue Oct 28, 2014 3:05 pm Post subject: without update the openrc deptree located at /lib/rc/cache |
|
|
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.
ref:http://www.funtoo.org/Package:OpenRC section caching |
|
Back to top |
|
|
|