1#!/bin/sh 2# 3# $FreeBSD$ 4# 5 6# PROVIDE: hostapd 7# REQUIRE: mountcritremote 8# KEYWORD: nojail shutdown 9 10. /etc/rc.subr 11 12name="hostapd" 13desc="Authenticator for IEEE 802.11 networks" 14command="/usr/sbin/${name}" 15 16ifn="$2" 17if [ -z "$ifn" ]; then 18 rcvar="hostapd_enable" 19 conf_file="/etc/${name}.conf" 20 pidfile="/var/run/${name}.pid" 21else 22 rcvar= 23 conf_file="/etc/${name}-${ifn}.conf" 24 pidfile="/var/run/${name}-${ifn}.pid" 25fi 26 27command_args="-P ${pidfile} -B ${conf_file}" 28required_files="${conf_file}" 29required_modules="wlan_xauth wlan_wep wlan_tkip wlan_ccmp" 30extra_commands="reload" 31 32load_rc_config ${name} 33run_rc_command "$1" 34