2006-10-08 00:52:52 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2015-01-22 22:50:21 +03:00
|
|
|
# $NetBSD: wpa_supplicant,v 1.6 2015/01/22 19:50:21 jmcneill Exp $
|
2006-10-08 00:52:52 +04:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: wpa_supplicant
|
|
|
|
# REQUIRE: network mountcritlocal
|
|
|
|
# BEFORE: NETWORKING dhclient
|
2009-09-30 22:17:22 +04:00
|
|
|
#
|
|
|
|
# We need to run a command that resides in /usr/sbin, and the
|
|
|
|
# /usr file system is traditionally mounted by mountcritremote.
|
|
|
|
# However, we cannot depend on mountcritremote, because that
|
|
|
|
# would introduce a circular dependency. Therefore, if you need
|
|
|
|
# wpa_supplicant to start during the boot process, you should
|
|
|
|
# ensure that the /usr file system is mounted by mountcritlocal,
|
|
|
|
# not by mountcritremote.
|
2006-10-08 00:52:52 +04:00
|
|
|
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
|
|
|
|
name="wpa_supplicant"
|
|
|
|
rcvar=$name
|
|
|
|
command="/usr/sbin/wpa_supplicant"
|
2013-02-01 17:29:33 +04:00
|
|
|
reload_cmd="/usr/sbin/wpa_cli reconfigure"
|
2008-11-17 14:34:04 +03:00
|
|
|
extra_commands="reload"
|
2014-01-23 11:26:50 +04:00
|
|
|
start_precmd="wpa_supplicant_precmd"
|
|
|
|
|
|
|
|
wpa_supplicant_precmd()
|
|
|
|
{
|
|
|
|
if [ ! -d /var/run/wpa_supplicant ]; then
|
|
|
|
mkdir -p -m 755 /var/run/wpa_supplicant
|
|
|
|
fi
|
2015-01-22 22:50:21 +03:00
|
|
|
rc_flags="-B $rc_flags"
|
2014-01-23 11:26:50 +04:00
|
|
|
}
|
2006-10-08 00:52:52 +04:00
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|