version 1.2, 2014/09/15 19:06:52
|
version 1.2.2.1, 2015/03/05 22:32:00
|
Line 4 BSSID="00:50:43:20:6f:a9"
|
Line 4 BSSID="00:50:43:20:6f:a9"
|
|
|
IFACE="wlan0" |
IFACE="wlan0" |
WIFIDEV="ath0" |
WIFIDEV="ath0" |
|
CLONEOPTS="" |
|
|
REGDOMAIN="" |
REGDOMAIN="" |
COUNTRY="" |
COUNTRY="" |
Line 13 CHAN="-1"
|
Line 14 CHAN="-1"
|
BINT="100" |
BINT="100" |
WIFIOPTS="-bgscan" |
WIFIOPTS="-bgscan" |
|
|
OPT="" | OPTS="" |
IP="172.31.1.1/30" |
IP="172.31.1.1/30" |
|
|
|
[ -z "$IFACE" -o -z "$WIFIDEV" ] && exit |
|
|
echo "Config wireless WDS interface $IFACE ..." |
echo "Config wireless WDS interface $IFACE ..." |
|
|
ifconfig $IFACE create wlandev $WIFIDEV wlanmode wds wlanbssid $BSSID wdslegacy | ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode wds wlanbssid $BSSID wdslegacy || 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 |
ifconfig $IFACE ssid $SSID | if [ -n "$WIFIOPTS" ]; then |
ifconfig $IFACE inet ${IP} ${OPT} up | 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 |
| ifconfig $IFACE $OPTS up |
|
|
[ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE |
[ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE |
|
|