Convert GL-AR150 to TWO_PORT #224

Closed
fbl wants to merge 2 commits from fbl:ar150 into master
2 changed files with 13 additions and 5 deletions
Showing only changes of commit 37a34fb33c - Show all commits

View File

@ -0,0 +1,12 @@
# The GL-AR150 was converted from ONEPORT to TWOPORT.
# Copy ETHMODE to LAN1MODE ("LAN"-Port) and set LAN0MODE ("WAN"-Port) to WAN to retain the configured behaviour for upgraded devices.
if [ -s /etc/network.config ] ; then
. /etc/network.config
# Ensure ETHMODE contains a sensible value. Use default behaviour (CLIENT) otherwise.
[ "$ETHMODE" != "BATMAN" ] && [ "$ETHMODE" != "CLIENT" ] && [ "$ETHMODE" != "WAN" ] && ETHMODE="CLIENT"
echo "LAN0MODE='WAN' # use BATMAN, CLIENT or WAN" > /etc/network.config
echo "LAN1MODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
echo "FORCEPARSE='2' # Parse at: 0=first boot only, 1=every reboot, 2=next reboot (once)" >> /etc/network.config
fi

View File

@ -2,12 +2,8 @@
WANDEV=eth1
SWITCHDEV=eth0
WAN_PORTS=
BATMAN_PORTS="0t"
CLIENT_PORTS="0t"
TWO_PORT=YES
ETHMESHMAC="$(macFlipLocalBit $(cat /sys/class/net/eth0/address))"
. /etc/network.mode
ETHPORT=1