]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - etc/rc.d/wpa_supplicant
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / etc / rc.d / wpa_supplicant
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: wpa_supplicant
7 # REQUIRE: mountcritremote
8 # KEYWORD: nojail nostart
9
10 . /etc/rc.subr
11 . /etc/network.subr
12
13 name="wpa_supplicant"
14 rcvar=
15 command="/usr/sbin/${name}"
16 conf_file="/etc/wpa_supplicant.conf"
17
18 ifn="$2"
19 if [ -z "$ifn" ]; then
20         return 1
21 fi
22
23 case ${ifn} in
24 ndis*)
25         driver="ndis"
26         ;;
27 *)
28         driver="bsd"
29         ;;
30 esac
31
32 load_rc_config $name
33
34 pidfile="/var/run/${name}/${ifn}.pid"
35 command_args="-B -q -i $ifn -c $conf_file -D $driver -P $pidfile"
36 required_files=$conf_file
37
38 run_rc_command "$1"