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

    1: #!/bin/sh
    2: 
    3: BSSID="00:50:43:20:6f:a9"
    4: 
    5: IFACE="wlan0"
    6: WIFIDEV="ath0"
    7: CLONEOPTS=""
    8: 
    9: REGDOMAIN=""
   10: COUNTRY=""
   11: 
   12: SSID="adhoc"
   13: CHAN="36:a"
   14: BINT="100"
   15: WIFIOPTS=""
   16: 
   17: OPTS=""
   18: IP="172.31.1.1/30"
   19: IP6=""
   20: 
   21: [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit
   22: 
   23: echo "Config wireless AdHoc interface $IFACE ..."
   24: 
   25: ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode ibss || exit
   26: if [ -n "$REGDOMAIN" ]; then
   27: 	ifconfig $IFACE regdomain $REGDOMAIN
   28: fi
   29: if [ -n "$COUNTRY" ]; then
   30: 	ifconfig $IFACE country $COUNTRY
   31: fi
   32: if [ -n "$WIFIOPTS" ]; then
   33: 	ifconfig $IFACE $WIFIOPTS
   34: fi
   35: if [ -n "$BINT" ]; then
   36: 	ifconfig $IFACE bintval $BINT
   37: fi
   38: if [ -n "$CHAN" ]; then
   39: 	ifconfig $IFACE channel $CHAN
   40: fi
   41: if [ -n "$SSID" ]; then
   42: 	ifconfig $IFACE ssid $SSID
   43: fi
   44: if [ -n "$IP" ]; then
   45: 	ifconfig $IFACE inet $IP
   46: fi
   47: if [ -n "$IP6" ]; then
   48: 	ifconfig $IFACE inet6 $IP6
   49: fi
   50: ifconfig $IFACE $OPTS up
   51: 
   52: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
   53: 
   54: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
   55: 
   56: #wlandebug -i $IFACE output+inact+node+11n

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