File:  [ELWIX - Embedded LightWeight unIX -] / elwix / config / etc / uboot / rc.d / 011.sta.stop
Revision 1.2.2.1: download - view: text, annotated - select for diffs - revision graph
Thu Mar 5 22:32:00 2015 UTC (9 years, 4 months ago) by misho
Branches: elwix2_3
Diff to: branchpoint 1.2: preferred, unified
enhance boot scripts

    1: #!/bin/sh
    2: 
    3: IFACE="wlan0"
    4: WIFIDEV="ath0"
    5: CLONEOPTS=""
    6: 
    7: REGDOMAIN=""
    8: COUNTRY=""
    9: 
   10: SSID="ap"
   11: BINT="100"
   12: WIFIOPTS=""
   13: 
   14: OPTS=""
   15: IP="172.31.1.2/30"
   16: 
   17: [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit
   18: 
   19: echo "Config wireless Station interface $IFACE ..."
   20: 
   21: ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode sta || exit
   22: if [ -n "$REGDOMAIN" ]; then
   23: 	ifconfig $IFACE regdomain $REGDOMAIN
   24: fi
   25: if [ -n "$COUNTRY" ]; then
   26: 	ifconfig $IFACE country $COUNTRY
   27: fi
   28: if [ -n "$WIFIOPTS" ]; then
   29: 	ifconfig $IFACE $WIFIOPTS
   30: fi
   31: if [ -n "$BINT" ]; then
   32: 	ifconfig $IFACE bintval $BINT
   33: fi
   34: if [ -n "$CHAN" ]; then
   35: 	ifconfig $IFACE channel $CHAN
   36: fi
   37: if [ -n "$SSID" ]; then
   38: 	ifconfig $IFACE ssid $SSID
   39: fi
   40: if [ -n "$IP" ]; then
   41: 	ifconfig $IFACE inet $IP
   42: fi
   43: ifconfig $IFACE $OPTS up
   44: 
   45: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
   46: 
   47: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
   48: 
   49: #wlandebug -i $IFACE state+scan+assoc+auth+11n

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