Annotation of elwix/config/etc/uboot/rc.d/011.sta.stop, revision 1.3
1.2 misho 1: #!/bin/sh
2:
3: IFACE="wlan0"
4: WIFIDEV="ath0"
1.3 ! misho 5: CLONEOPTS=""
1.2 misho 6:
7: REGDOMAIN=""
8: COUNTRY=""
9:
10: SSID="ap"
11: BINT="100"
12: WIFIOPTS=""
13:
1.3 ! misho 14: OPTS=""
! 15: #IP="auto"
1.2 misho 16: IP="172.31.1.2/30"
1.3 ! misho 17: #IP6="auto"
! 18: IP6=""
! 19:
! 20: [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit
1.2 misho 21:
22: echo "Config wireless Station interface $IFACE ..."
23:
1.3 ! misho 24: ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode sta || exit
! 25: if [ -n "$REGDOMAIN" ]; then
! 26: ifconfig $IFACE regdomain $REGDOMAIN
! 27: fi
! 28: if [ -n "$COUNTRY" ]; then
! 29: ifconfig $IFACE country $COUNTRY
! 30: fi
! 31: if [ -n "$WIFIOPTS" ]; then
! 32: ifconfig $IFACE $WIFIOPTS
! 33: fi
! 34: if [ -n "$BINT" ]; then
! 35: ifconfig $IFACE bintval $BINT
! 36: fi
! 37: if [ -n "$CHAN" ]; then
! 38: ifconfig $IFACE channel $CHAN
! 39: fi
! 40: if [ -n "$SSID" ]; then
! 41: ifconfig $IFACE ssid $SSID
! 42: fi
! 43: if [ -n "$IP" ]; then
! 44: if [ "$IP" = "auto" ]; then
! 45: dhclient $IFACE
! 46: else
! 47: ifconfig $IFACE inet $IP
! 48: fi
! 49: fi
! 50: if [ -n "$IP6" ]; then
! 51: if [ "$IP" = "auto" ]; then
! 52: ifconfig $IFACE accept_rtadv
! 53: else
! 54: ifconfig $IFACE inet6 $IP6
! 55: fi
! 56: fi
! 57: ifconfig $IFACE $OPTS up
1.2 misho 58:
59: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
60:
61: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
62:
63: #wlandebug -i $IFACE state+scan+assoc+auth+11n
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>