diff --git a/etc/network.subr b/etc/network.subr index dbceb56b1db0..b05635a49a5b 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -48,7 +48,7 @@ ifconfig_up() fi if wpaif $1; then - #/etc/rc.d/wpa_supplicant start $1 + /etc/rc.d/wpa_supplicant start $1 _cfg=0 # XXX: not sure this should count fi @@ -89,7 +89,7 @@ ifconfig_down() IFS="$oldifs" if wpaif $1; then - #/etc/rc.d/wpa_supplicant stop $1 + /etc/rc.d/wpa_supplicant stop $1 _cfg=0 fi diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 9683f42620cc..b76df95c2228 100755 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -36,7 +36,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \ timed tmp \ ugidfw usbd \ var virecover \ - watchdogd \ + watchdogd wpa_supplicant \ ypbind yppasswdd ypserv \ ypset ypupdated ypxfrd FILESDIR= /etc/rc.d diff --git a/etc/rc.d/wpa_supplicant b/etc/rc.d/wpa_supplicant new file mode 100644 index 000000000000..751235769a21 --- /dev/null +++ b/etc/rc.d/wpa_supplicant @@ -0,0 +1,29 @@ +#!/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 + +load_rc_config $name + +pid_file="/var/run/${name}/${ifn}.pid" +command_args="-B -q -i $ifn -P $pid_file -c $conf_file" +required_files=$conf_file + +run_rc_command "$1"