Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .