Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working with Debian. I know that wpa_supplicant is being started during boot. Where is it being started from? Also, I want to change the config file that wpa_supplicant is using. I know it's possible to start wpa_supplicant from the command line and specify a config file but how I do change this permanently?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The scripts responsible for configuring wireless network interfaces at boot are located in

  /etc/network/{if-pre-up.d,ip-up.d,if-down.d,if-post-down.d} 

Each of these directories contains a wpasupplicant file, which is just a symbolic link to /etc/wpasupplicant/ifupdown.sh, a script that states, in its header:

  #####################################################################
  ## Purpose
  # This file is executed by ifupdown in pre-up, post-up, pre-down and
  # post-down phases of network interface configuration. It allows
  # ifup(8), and ifdown(8) to manage wpa_supplicant(8) and wpa_cli(8)
  # processes running in daemon mode.
  #
  # /etc/wpa_supplicant/functions.sh is sourced by this file.

There is no reference to wpa_supplicant per se in this file, but the reference is in functions.sh, the file sourced by wpasupplicant. It contains the following lines:

  WPA_SUP_BIN="/sbin/wpa_supplicant"
  ....
  start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \
  --name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
   -- $WPA_SUP_OPTIONS $WPA_SUP_CONF
  ....
  start-stop-daemon --stop --oknodo $DAEMON_VERBOSITY \
  --exec $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE

These are the two calls you wish to modify.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.