3
# Buyer beware! This is really only useful if you have a
4
# MiniPCI or other permanent wireless device.
6
# However, the wpa_supplicant daemon will start, and sit waiting
7
# for the name interface to come up. Therefore, if you want to use
8
# this with pcmcia or other nonsense, it may be best to ifrename
9
# your wireless interface if it has an "ethX" name that is variable.
11
PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
DAEMON=/usr/sbin/wpa_supplicant
14
PIDFILE="/var/run/wpasupplicant.pid"
15
CONFIG="/etc/wpa_supplicant.conf"
16
PNAME="wpa_supplicant"
19
OPTIONS="-Bw" # daemonize and wait for interface
22
[ -f /etc/default/wpasupplicant ] && . /etc/default/wpasupplicant
24
if [ "$ENABLED" = "0" ]; then
25
echo "wpasupplicant: disabled, see /etc/default/wpasupplicant"
29
[ -f $CONFIG ] || ( echo "No configuration file found, not starting."; \
32
[ -f $DAEMON ] || exit 0
38
echo -n "Starting wpasupplicant: "
39
start-stop-daemon --start --name $PNAME \
40
--oknodo --startas $DAEMON -- -B $OPTIONS
44
echo -n "Stopping wpasupplicant: "
45
start-stop-daemon --stop --name $PNAME \
48
if [ -f $PIDFILE ]; then
53
echo -n "Reloading wpasupplicant: "
54
start-stop-daemon --stop --signal HUP \
59
echo -n "Restarting wpasupplicant: "
60
start-stop-daemon --stop --name $PNAME \
62
if [ -f $PIDFILE ]; then
65
start-stop-daemon --start --name $PNAME \
66
--oknodo --startas $DAEMON -- -B $OPTIONS
70
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2