]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - etc/rc.d/hostapd
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / etc / rc.d / hostapd
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # PROVIDE: hostapd
7 # REQUIRE: mountcritremote
8 # KEYWORD: nojail shutdown
9
10 . /etc/rc.subr
11
12 name="hostapd"
13 command="/usr/sbin/${name}"
14
15 ifn="$2"
16 if [ -z "$ifn" ]; then
17         rcvar="hostapd_enable"
18         conf_file="/etc/${name}.conf"
19         pidfile="/var/run/${name}.pid"
20 else
21         rcvar=
22         conf_file="/etc/${name}-${ifn}.conf"
23         pidfile="/var/run/${name}-${ifn}.pid"
24 fi
25
26 command_args="-P ${pidfile} -B ${conf_file}"
27 required_files="${conf_file}"
28 required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp"
29 extra_commands="reload"
30
31 load_rc_config ${name}
32 run_rc_command "$1"