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

The port override feature of network.config is hard to maintain, since
changes to devices (e.g. port configuration updates, switch to DSA) have
to be applied to this manual override as well.

As this feature is probably hardly used anyway, remove it.
The port override migration for the Archer C7 v2 is not necessary
anymore, remove it as well.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Tested-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Fabian Bläse 2021-07-09 10:32:37 +02:00
parent a2400a6e67
commit a72874f86f
4 changed files with 4 additions and 21 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network PKG_NAME:=fff-network
PKG_RELEASE:=49 PKG_RELEASE:=50
include $(INCLUDE_DIR)/package.mk 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 . /etc/network.config
else else
# Write network.config # 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 if [ "$ONE_PORT" = "YES" ] || [ -n "$ETHPORT" ] ; then
echo "ETHMODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config echo "ETHMODE='$ETHMODE' # use BATMAN, CLIENT or WAN" >> /etc/network.config
fi fi
@ -111,7 +106,7 @@ elif [ "$TWO_PORT" = "YES" ]; then
uci commit network uci commit network
fi fi
else 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 if [ "$DSA" = "1" ]; then
uci set network.$SWITCHDEV=device uci set network.$SWITCHDEV=device