#!/bin/sh # create WLAN devices (only once at startup) if [ ! -f /tmp/.wlandevices_created ]; then # Creating ath0 first time for it using MAC+1 for sure. ("wlanconfig [...] -bssid" caused several kernel faults) wlanconfig ath0 create wlandev wifi0 wlanmode ap >&- 2>&- && \ echo "`uptime | awk -F" " '{print $1}'`: ath0 created" >>/tmp/.startup_log wlanconfig ath1 create wlandev wifi0 wlanmode ap >&- 2>&- && \ echo "`uptime | awk -F" " '{print $1}'`: ath1 created" >>/tmp/.startup_log wlanconfig ath2 create wlandev wifi0 wlanmode sta nosbeacon >&- 2>&- && \ echo "`uptime | awk -F" " '{print $1}'`: ath2 created" >>/tmp/.startup_log touch /tmp/.wlandevices_created fi