firmware/bsp/ubnt-nano-m/root_file_system/etc/network.nanostation-m
tk+ff@meskal.net 53257078c9 splits configuration and implementation for different ubnt setups
* introduces new file network.mode currently only used for nanostation
* network.mode is added to sysupgrade.conf
=> once configured the the setting should survive an upgrade

Reviewed-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2015-09-27 11:27:27 +02:00

32 lines
839 B
Plaintext

WANDEV=eth0
SWITCHDEV=eth0
CLIENT_PORTS=""
WAN_PORTS=""
BATMAN_PORTS=""
. /etc/network.mode
CLIENTIF="w2ap"
ETHMESHMAC=
ROUTERMAC=w2mesh
uci set network.$SWITCHDEV=interface
uci set network.$SWITCHDEV.ifname=$SWITCHDEV
uci set network.mesh.ifname="bat0"
if [ "$ETHMODE" = "WAN" ] ; then
## Activate for WAN:
echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
uci set network.wan.ifname=$WANDEV
elif [ "$ETHMODE" = "CLIENT" ] ; then
## Activate Client:
CLIENTIF="w2ap eth0"
uci set network.mesh.ifname="bat0 $SWITCHDEV"
else
## Activate BATMAN:
uci set network.ethmesh.ifname="$SWITCHDEV"
fi