Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why is wpa_supplicant starting automatically?
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
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Sat May 23, 2015 10:21 am    Post subject: Why is wpa_supplicant starting automatically? Reply with quote

I recently noticed that wpa_supplicant is being started and is connecting to my wireless network, but I have no idea what is starting it. The corresponding OpenRC services are not running,
Code:

# /etc/init.d/net.wlp3s0 status
 * status: stopped
# /etc/init.d/wpa_supplicant status
 * status: stopped

but nonetheless something is spawning a wpa_supplicant process,
Code:

# ps aux | grep wpa_supplicant
root ....... wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlp3s0


/etc/conf.d/net contains
Code:

modules_wlp3s0="wpa_supplicant"
config_wlp3s0="dhcp"

but since net.wlp3s0 is disabled, I don't think this is relevant.

So my question is, what is starting wpa_supplicant, or at least how can I find this out? Thanks.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Sat May 23, 2015 10:43 am    Post subject: Reply with quote

You can try grepping through
ps ajx

Code:
ps jax
 PPID   PID  PGID   SID TTY      TPGID STAT   UID   TIME COMMAND
    0     1     1     1 ?           -1 Ss       0   0:05 init [3]   
    0     2     0     0 ?           -1 S        0   0:00 [kthreadd]
    2     3     0     0 ?           -1 S        0   5:46 [ksoftirqd/0]
    2     5     0     0 ?           -1 S<       0   0:00 [kworker/0:0H]
    2     7     0     0 ?           -1 S        0  16:14 [rcu_sched]
----// snip //----

PPID stands for "Parrent's PID"

Another way is answer a simple question:
How do you configure your network?
Back to top
View user's profile Send private message
Xander314
n00b
n00b


Joined: 16 Apr 2012
Posts: 61

PostPosted: Sat May 23, 2015 1:22 pm    Post subject: Reply with quote

Thanks. Turns out wpa_supplicant was indeed started by init (PPID was 1). As for how I configure my network, the answer is I don't. I had configured wpa_supplicant and everything was working, so I assumed I had already gone through all the network config. However, I recently realised that in fact I never created /etc/init.d/net.wlan0 or added it to any runlevel. dpcpcd is being started as a dependency, so is it possible that dhcpcd is bringing up the interface with wpa_supplicant even though there is no OpenRC service file for net.wlan0?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sat May 23, 2015 2:04 pm    Post subject: Reply with quote

Xander314 wrote:
so is it possible that dhcpcd is bringing up the interface with wpa_supplicant even though there is no OpenRC service file for net.wlan0?


Yes, dhcpcd will start wpa_supplicant by default IF the interface is wireless AND it can find a wpa_supplicant.conf AND wpa_supplcant.conf is configured for ctrl_interface AND wpa_cli claims wpa_supplicant is not running.
And, again by default, dhcpcd will start every interface it can if not restricted.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Sat May 23, 2015 3:21 pm    Post subject: Reply with quote

Quote:
As for how I configure my network, the answer is I don't.

Yes, you do:
Quote:
dpcpcd is being started as a dependency


Glad you got it sorted ;)
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