2005-06-30 04:52:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: wpa_supplicant
|
|
|
|
# REQUIRE: mountcritremote
|
|
|
|
# KEYWORD: nojail nostart
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
. /etc/network.subr
|
|
|
|
|
|
|
|
name="wpa_supplicant"
|
|
|
|
rcvar=
|
|
|
|
command="/usr/sbin/${name}"
|
|
|
|
conf_file="/etc/wpa_supplicant.conf"
|
|
|
|
|
|
|
|
ifn="$2"
|
|
|
|
if [ -z "$ifn" ]; then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
2005-10-19 22:26:47 +00:00
|
|
|
case ${ifn} in
|
|
|
|
ndis*)
|
|
|
|
driver="ndis"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
driver="bsd"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-06-30 04:52:47 +00:00
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
pid_file="/var/run/${name}/${ifn}.pid"
|
2005-10-19 22:26:47 +00:00
|
|
|
command_args="-B -q -i $ifn -c $conf_file -D $driver -P $pid_file"
|
2005-06-30 04:52:47 +00:00
|
|
|
required_files=$conf_file
|
|
|
|
|
|
|
|
run_rc_command "$1"
|