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 13name="wpa_supplicant" 14desc="WPA/802.11i Supplicant for wireless network devices" 15rcvar= 16 17ifn="$2" 18if [ -z "$ifn" ]; then 19 return 1 20fi 21 22if is_wired_interface ${ifn} ; then 23 driver="wired" 24else 25 driver="bsd" 26fi 27 28load_rc_config $name 29 30command=${wpa_supplicant_program} 31conf_file=${wpa_supplicant_conf_file} 32pidfile="/var/run/${name}/${ifn}.pid" 33command_args="-B -i $ifn -c $conf_file -D $driver -P $pidfile" 34required_files=$conf_file 35required_modules="wlan_wep wlan_tkip wlan_ccmp" 36 37run_rc_command "$1" 38