Resync patch with contrib.
[dragonfly.git] / etc / rc.d / wpa_supplicant
blobf670213ad38a4b5ed0ec01dda56d9d8b8b058672
1 #!/bin/sh
3 # $FreeBSD: src/etc/rc.d/wpa_supplicant,v 1.2 2005/10/19 22:26:47 jkim Exp $
4 # $DragonFly: src/etc/rc.d/wpa_supplicant,v 1.1 2007/07/10 22:36:01 swildner Exp $
7 # PROVIDE: wpa_supplicant
8 # REQUIRE: mountcritremote
9 # KEYWORD: nojail nostart
11 . /etc/rc.subr
12 . /etc/network.subr
14 name="wpa_supplicant"
15 rcvar=
16 command="/usr/sbin/${name}"
17 conf_file="/etc/wpa_supplicant.conf"
19 ifn="$2"
20 if [ -z "$ifn" ]; then
21 return 1
24 case ${ifn} in
25 ndis*)
26 driver="ndis"
29 driver="bsd"
31 esac
33 load_rc_config $name
35 pid_file="/var/run/${name}/${ifn}.pid"
36 command_args="-B -q -i $ifn -c $conf_file -D $driver -P $pid_file"
37 required_files=$conf_file
39 run_rc_command "$1"