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)
This commit is contained in:
parent
d3a260999d
commit
a7e55c1e77
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147682
@ -48,7 +48,7 @@ ifconfig_up()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if wpaif $1; then
|
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
|
_cfg=0 # XXX: not sure this should count
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ ifconfig_down()
|
|||||||
IFS="$oldifs"
|
IFS="$oldifs"
|
||||||
|
|
||||||
if wpaif $1; then
|
if wpaif $1; then
|
||||||
#/etc/rc.d/wpa_supplicant stop $1
|
/etc/rc.d/wpa_supplicant stop $1
|
||||||
_cfg=0
|
_cfg=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
|
|||||||
timed tmp \
|
timed tmp \
|
||||||
ugidfw usbd \
|
ugidfw usbd \
|
||||||
var virecover \
|
var virecover \
|
||||||
watchdogd \
|
watchdogd wpa_supplicant \
|
||||||
ypbind yppasswdd ypserv \
|
ypbind yppasswdd ypserv \
|
||||||
ypset ypupdated ypxfrd
|
ypset ypupdated ypxfrd
|
||||||
FILESDIR= /etc/rc.d
|
FILESDIR= /etc/rc.d
|
||||||
|
29
etc/rc.d/wpa_supplicant
Normal file
29
etc/rc.d/wpa_supplicant
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user