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

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