Annotation of elwix/config/etc/uboot/rc.d/011.ap_wpa.stop, revision 1.2.2.2

1.2       misho       1: #!/bin/sh
                      2: 
                      3: IFACE="wlan0"
                      4: WIFIDEV="ath0"
1.2.2.1   misho       5: CLONEOPTS=""
1.2       misho       6: 
                      7: REGDOMAIN=""
                      8: COUNTRY=""
                      9: 
                     10: SSID="wpa-ap"
                     11: CHAN="36:a"
                     12: BINT="100"
                     13: WIFIOPTS="-bgscan"
                     14: 
                     15: WPAPASS="wpa_go"
                     16: 
1.2.2.1   misho      17: OPTS=""
1.2       misho      18: IP="172.31.1.1/30"
1.2.2.2 ! misho      19: IP6=""
1.2       misho      20: 
                     21: [ -r /etc/rc.wifi ] && . /etc/rc.wifi
                     22: 
1.2.2.1   misho      23: [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit
1.2       misho      24: 
1.2.2.1   misho      25: echo "Config wireless AP (WPA) interface $IFACE ..."
1.2       misho      26: 
1.2.2.1   misho      27: ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode hostap || exit
                     28: if [ -n "$REGDOMAIN" ]; then
                     29:        ifconfig $IFACE regdomain $REGDOMAIN
                     30: fi
                     31: if [ -n "$COUNTRY" ]; then
                     32:        ifconfig $IFACE country $COUNTRY
                     33: fi
                     34: if [ -n "$WIFIOPTS" ]; then
                     35:        ifconfig $IFACE $WIFIOPTS
                     36: fi
                     37: if [ -n "$BINT" ]; then
                     38:        ifconfig $IFACE bintval $BINT
                     39: fi
                     40: if [ -n "$CHAN" ]; then
                     41:        ifconfig $IFACE channel $CHAN
                     42: fi
                     43: if [ -n "$SSID" ]; then
                     44:        ifconfig $IFACE ssid $SSID
                     45: fi
1.2.2.2 ! misho      46: mkhostconf $IFACE wpa "$WPAPASS"
1.2.2.1   misho      47: if [ -n "$IP" ]; then
                     48:        ifconfig $IFACE inet $IP
                     49: fi
1.2.2.2 ! misho      50: if [ -n "$IP6" ]; then
        !            51:        ifconfig $IFACE inet6 $IP6
        !            52: fi
1.2.2.1   misho      53: ifconfig $IFACE $OPTS up
1.2       misho      54: 
                     55: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
                     56: 
                     57: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
                     58: 
                     59: [ -r /var/tmp/hostapd_$IFACE.conf ] && hostapd -B -K -P /var/run/hostapd_$IFACE.pid /var/tmp/hostapd_$IFACE.conf
                     60: 
                     61: #wlandebug -i $IFACE state+scan+assoc+crypto+11n

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>