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