View previous topic :: View next topic |
Author |
Message |
TypicalGentooUser n00b
Joined: 26 Sep 2020 Posts: 7
|
Posted: Sat Sep 26, 2020 8:12 pm Post subject: wpa_supplicant not called by dhcpcd at startup |
|
|
Hello, I want to make dhcpcd to auto connect using wpa_supplicant.
Currently I do it manually:
Code: | wpa_supplicant -i wlp2s0f0u7 -B -Dn180211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
dhcpcd wlp2s0f0u7
|
wpa_supplicant is already configured for home network.
dhcpcd is running at startup, but it doesn't use wpa_supplicant on interface that I mentioned.
My /etc/conf.d/net:
Code: | modules_wlp2s0f0u7="wpa_supplicant"
config_wlp2s0f0u7="dhcp" |
And /etc/conf.d/wpa_supplicant:
Code: | wpa_supplicant_args="-B -M -c/etc/wpa_supplicant/wpa_supplicant.conf -Dn180211,wext" |
P.S. will be even greater if it will auto connect any wlp* interface even if I plug adapter into different usb.
Please help! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54244 Location: 56N 3W
|
Posted: Sat Sep 26, 2020 9:04 pm Post subject: |
|
|
TypicalGentooUser,
Welcome to Gentoo.
Your interface name is wlp2s0f0u7, which is renamed by udev from its kernel assigned name when it was discovered.
As you know, its USB slot dependent.
The same thing happens with ethernet interfaces. There are several ways to fix this.
1. Append to the kernel command line.
2. Create an empty udev rules file. It needs te have the right name.
They both stop udev doing the renaming of all network interfaces.
3. Write a udev rule that uses the udev visible properties of the device to assign a name of your choosing.
Do not use the kernel name sequence nor the udev sequence.
Your /etc/conf.d/net is correct.
Did you create the net.wlp2s0f0u7 symbolic link in /etc/init.d/ ? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
|
Back to top |
|
|
TypicalGentooUser n00b
Joined: 26 Sep 2020 Posts: 7
|
Posted: Sun Sep 27, 2020 9:01 pm Post subject: |
|
|
NeddySeagoon wrote: | TypicalGentooUser,
Welcome to Gentoo.
Your interface name is wlp2s0f0u7, which is renamed by udev from its kernel assigned name when it was discovered.
As you know, its USB slot dependent.
The same thing happens with ethernet interfaces. There are several ways to fix this.
1. Append to the kernel command line.
2. Create an empty udev rules file. It needs te have the right name.
They both stop udev doing the renaming of all network interfaces.
3. Write a udev rule that uses the udev visible properties of the device to assign a name of your choosing.
Do not use the kernel name sequence nor the udev sequence.
Your /etc/conf.d/net is correct.
Did you create the net.wlp2s0f0u7 symbolic link in /etc/init.d/ ? |
Yes, I did.
When I running openrc:
Code: |
* Bringing up interface wlp2s0f0u7
* Starting wpa_supplicant on wlp2s0f0u7 ...
Successfully initialized wpa_supplicant
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlp2s0f0u7' manually if it is not used anymore
Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=wheel'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
nl80211: deinit ifname=wlp2s0f0u7 disabled_11b_rates=0
* start-stop-daemon: failed to start `/usr/sbin/wpa_supplicant' [ !! ]
* ERROR: net.wlp2s0f0u7 failed to start
|
Needless to say that I tried to rerun it after killall wpa_supplicant; rm /var/run/wpa_supplicant/wlp2s0f0u7; |
|
Back to top |
|
|
|