#!/bin/sh

[ "${IFACE%%[0-9]*}" = "wlan" ] || exit 0

case "$IF_WIRELESS_MODE" in
	ap)
		[ -x /usr/sbin/hostapd ] || {
			logger -t hostap "No hostapd program found"
			exit 1
		}
		logger -t hostap "Starting hostapd"
		hostapd -B /tmp/hostapd.conf
		;;
esac
