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