version 1.2, 2014/09/15 19:06:52
|
version 1.2.2.1, 2015/03/05 22:32:00
|
Line 2
|
Line 2
|
|
|
IFACE="wlan0" |
IFACE="wlan0" |
WIFIDEV="ath0" |
WIFIDEV="ath0" |
|
CLONEOPTS="" |
|
|
REGDOMAIN="" |
REGDOMAIN="" |
COUNTRY="" |
COUNTRY="" |
Line 14 WIFIOPTS="tsn -bgscan"
|
Line 15 WIFIOPTS="tsn -bgscan"
|
WPAPASS="tsn_go" |
WPAPASS="tsn_go" |
WEPKEY="0123456789" |
WEPKEY="0123456789" |
|
|
OPT="" | OPTS="" |
IP="172.31.1.1/30" |
IP="172.31.1.1/30" |
|
|
[ -r /etc/rc.wifi ] && . /etc/rc.wifi |
[ -r /etc/rc.wifi ] && . /etc/rc.wifi |
|
|
|
[ -z "$IFACE" -o -z "$WIFIDEV" ] && exit |
|
|
echo "Config wireless AP (TSN) interface $IFACE ..." |
echo "Config wireless AP (TSN) interface $IFACE ..." |
|
|
ifconfig $IFACE create wlandev $WIFIDEV wlanmode hostap | ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode hostap || exit |
#ifconfig $IFACE regdomain $REGDOMAIN | if [ -n "$REGDOMAIN" ]; then |
#ifconfig $IFACE country $COUNTRY | ifconfig $IFACE regdomain $REGDOMAIN |
ifconfig $IFACE $WIFIOPTS | fi |
ifconfig $IFACE bintval $BINT | if [ -n "$COUNTRY" ]; then |
ifconfig $IFACE channel $CHAN | ifconfig $IFACE country $COUNTRY |
| fi |
| if [ -n "$WIFIOPTS" ]; then |
| ifconfig $IFACE $WIFIOPTS |
| fi |
| if [ -n "$BINT" ]; then |
| ifconfig $IFACE bintval $BINT |
| fi |
| if [ -n "$CHAN" ]; then |
| ifconfig $IFACE channel $CHAN |
| fi |
| if [ -n "$SSID" ]; then |
| ifconfig $IFACE ssid $SSID |
| fi |
| if [ -n "$IP" ]; then |
| ifconfig $IFACE inet $IP |
| fi |
mkhostconf $IFACE tsn "$WPAPASS" $WEPKEY |
mkhostconf $IFACE tsn "$WPAPASS" $WEPKEY |
| ifconfig $IFACE $OPTS up |
ifconfig $IFACE ssid $SSID | |
ifconfig $IFACE inet ${IP} ${OPT} up | |
|
|
[ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE |
[ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE |
|
|