]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/wpa_supplicant
Add UPDATING entries and bump version.
[FreeBSD/FreeBSD.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 desc="WPA/802.11i Supplicant for wireless network devices"
15 rcvar=
16
17 ifn="$2"
18 if [ -z "$ifn" ]; then
19         return 1
20 fi
21
22 is_ndis_interface()
23 {
24         case `sysctl -n net.wlan.${1#wlan}.%parent 2>/dev/null` in
25                 ndis*) true ;;
26                 *) false ;;
27         esac
28 }
29
30 if is_wired_interface ${ifn} ; then
31         driver="wired"
32 elif is_ndis_interface ${ifn} ; then
33         driver="ndis"
34 else
35         driver="bsd"
36 fi
37
38 load_rc_config $name
39
40 command=${wpa_supplicant_program}
41 conf_file=${wpa_supplicant_conf_file}
42 pidfile="/var/run/${name}/${ifn}.pid"
43 command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile"
44 required_files=$conf_file
45 required_modules="wlan_wep wlan_tkip wlan_ccmp"
46
47 run_rc_command "$1"