File:  [ELWIX - Embedded LightWeight unIX -] / elwix / config / etc / uboot / rc.d / 011.dwds_relay.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

#!/bin/sh

IFACE="wlan0"
WIFIDEV="ath0"
CLONEOPTS=""

REGDOMAIN=""
COUNTRY=""

SSID="relay-dwds"
CHAN="36:a"
BINT="100"
WIFIOPTS="-apbridge -bgscan"

OPTS=""
IP="172.31.1.1/30"
IP6=""

DWDS_CLI="/etc/rc.S/011.dwds_cli.run"

[ -z "$IFACE" -o -z "$WIFIDEV" ] && exit

echo "Config wirelss DWDS (Relay) interface $IFACE ..."

if [ ! -x "$DWDS_CLI" ]; then
	echo "Error:: Can't start DWDS (Relay), because DWDS (Client) not configured!"
	exit 1
else
	eval "$DWDS_CLI"
fi

ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode hostap || exit
if [ -n "$REGDOMAIN" ]; then
	ifconfig $IFACE regdomain $REGDOMAIN
fi
if [ -n "$COUNTRY" ]; then
	ifconfig $IFACE country $COUNTRY
fi
if [ -n "$WIFIOPTS" ]; then
	ifconfig $IFACE $WIFIOPTS
fi
if [ -n "$BINT" ]; then
	ifconfig $IFACE bintval $BINT
fi
if [ -n "$CHAN" ]; then
	ifconfig $IFACE channel $CHAN
fi
if [ -n "$SSID" ]; then
	ifconfig $IFACE ssid $SSID
fi
if [ -n "$IP" ]; then
	ifconfig $IFACE inet $IP
fi
if [ -n "$IP6" ]; then
	ifconfig $IFACE inet6 $IP6
fi
ifconfig $IFACE $OPTS up

[ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE

[ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &

#wlandebug -i $IFACE state+scan+assoc+auth+wds+11n

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