[RFC] fff-network: Add migration for Archer C7 WAN ports #93

Closed
fbl wants to merge 1 commits from fbl:c7 into master
2 changed files with 15 additions and 1 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-network
PKG_RELEASE:=26
PKG_RELEASE:=27
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -0,0 +1,14 @@
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