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'd like to run wpa_supplicant -D wext -i wlan0 -c /etc/wpa_supplicant.conf on Debian startup (runlevels 2-5). I found some vague instructions from a related question that said to put a script in /etc/init.d/ and then symlink to it from the apropriate /etc/rcRUNLEVEL.d/ directories. However, I noticed that there are already some files named "wpasupplicant" that probably run at startup:





They all are symlinks to the same script, /etc/wpa_supplicant/ifupdown.sh. It has a comment at the beginning saying it "[...] allows ifup(8), and ifdown(8) to manage wpa_supplicant(8) and wpa_cli(8) processes running in daemon mode." However, the closest it gets to calling wpa_supplicant itself is (in functions.sh):

start-stop-daemon --start --oknodo $DAEMON_VERBOSITY \
    --name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
start-stop-daemon --stop --oknodo $DAEMON_VERBOSITY \
    --exec $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE

Does that mean it's safe to make an init.d script for wpa_supplicant, and if so what would it look like?

General info:

  • Debian Squeeze (5.0)
  • official wpasupplicant package (v0.6.10-2.1)

The full contents of my system's functions.sh and ifupdown.sh are here (dependent, of course, on my system's uptime—it's a five-year-old laptop that greatly enjoys overheating):



share|improve this question

1 Answer 1

Edit the wpa_supplicant.conf file and add it to /etc/network/interfaces


share|improve this answer

Your Answer


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.