NetBSD/etc/rc.d/wpa_supplicant
tron b1d97a6429 Make custom "reload" target work. Before this fix it would have tried
to send a HUP signal to "wpa_supplicant" instead.
2013-02-01 13:29:33 +00:00

28 lines
787 B
Bash

#!/bin/sh
#
# $NetBSD: wpa_supplicant,v 1.4 2013/02/01 13:29:33 tron Exp $
#
# PROVIDE: wpa_supplicant
# REQUIRE: network mountcritlocal
# BEFORE: NETWORKING dhclient
#
# 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.
$_rc_subr_loaded . /etc/rc.subr
name="wpa_supplicant"
rcvar=$name
command="/usr/sbin/wpa_supplicant"
reload_cmd="/usr/sbin/wpa_cli reconfigure"
extra_commands="reload"
load_rc_config $name
run_rc_command "$1"