diff options
author | brooks <brooks@FreeBSD.org> | 2005-06-30 04:52:47 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-06-30 04:52:47 +0000 |
commit | 17407ba288abc4df59497d85882b762b16d23fec (patch) | |
tree | 338622f0e16c0a423e93bb38ba220a9464545823 | |
parent | da81e8c0fcb389e17af19847ced52a20023cfc9b (diff) | |
download | FreeBSD-src-17407ba288abc4df59497d85882b762b16d23fec.zip FreeBSD-src-17407ba288abc4df59497d85882b762b16d23fec.tar.gz |
Add support for starting wpa_supplicant by adding the WPA keyword to an
interface's ifconfig_<ifn> entry in /etc/rc.conf.
Approved by: re (network interface startup blanket)
-rw-r--r-- | etc/network.subr | 4 | ||||
-rwxr-xr-x | etc/rc.d/Makefile | 2 | ||||
-rw-r--r-- | etc/rc.d/wpa_supplicant | 29 |
3 files changed, 32 insertions, 3 deletions
diff --git a/etc/network.subr b/etc/network.subr index dbceb56..b05635a 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 9683f42..b76df95 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 0000000..7512357 --- /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" |