fff-network: Remove port override features of network.config #152

Closed
fbl wants to merge 1 commits from fbl:delportoverride into master
4 changed files with 4 additions and 21 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
PKG_RELEASE:=49
PKG_RELEASE:=50
include $(INCLUDE_DIR)/package.mk

View File

@ -1,14 +0,0 @@
BOARD="$(uci get board.model.name)"
# only execute if running on a TP-Link Archer C7 v2
if [ "$BOARD" != "tplink,archer-c7-v2" ]; then
exit 0
fi
# only execute if there is something to migrate
if [ ! -s /etc/network.config ]; then
exit 0
fi
# modify WAN_PORTS to new single-interface configuration
sed -i '/WAN_PORTS/ s/6/0t/g' /etc/network.config

View File

@ -0,0 +1,2 @@
# Remove port configuration residues from earlier firmware versions
sed -i -e '/^WAN_PORTS/d' -e '/^BATMAN_PORTS/d' -e '/^CLIENT_PORTS/d' /etc/network.config

View File

@ -12,11 +12,6 @@ if [ -s /etc/network.config ] ; then
. /etc/network.config
else
# Write network.config
echo "CLIENT_PORTS='$CLIENT_PORTS'" > /etc/network.config
echo "BATMAN_PORTS='$BATMAN_PORTS'" >> /etc/network.config
if [ -n "$WAN_PORTS" ] ; then
echo "WAN_PORTS='$WAN_PORTS'" >> /etc/network.config
fi
if [ "$ONE_PORT" = "YES" ] || [ -n "$ETHPORT" ] ; then
echo "ETHMODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
fi
@ -111,7 +106,7 @@ elif [ "$TWO_PORT" = "YES" ]; then
uci commit network
fi
else
if ! uci -q get network.$SWITCHDEV > /dev/null || [ "$FORCEPARSE" = '1' ] ; then
if ! uci -q get network.$SWITCHDEV > /dev/null ; then
if [ "$DSA" = "1" ]; then
uci set network.$SWITCHDEV=device