#!/bin/sh IFACE="wlan0" WIFIDEV="ath0" REGDOMAIN="" COUNTRY="" SSID="wpa-ap" CHAN="36:a" BINT="100" WIFIOPTS="-bgscan" WPAPASS="wpa_go" OPT="" IP="172.31.1.1/30" [ -r /etc/rc.wifi ] && . /etc/rc.wifi echo "Config wireless AP (WPA) interface $IFACE ..." ifconfig $IFACE create wlandev $WIFIDEV wlanmode hostap #ifconfig $IFACE regdomain $REGDOMAIN #ifconfig $IFACE country $COUNTRY ifconfig $IFACE $WIFIOPTS ifconfig $IFACE bintval $BINT ifconfig $IFACE channel $CHAN mkhostconf $IFACE wpa "$WPAPASS" ifconfig $IFACE ssid $SSID ifconfig $IFACE inet ${IP} ${OPT} up [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 & [ -r /var/tmp/hostapd_$IFACE.conf ] && hostapd -B -K -P /var/run/hostapd_$IFACE.pid /var/tmp/hostapd_$IFACE.conf #wlandebug -i $IFACE state+scan+assoc+crypto+11n