[PATCH 3/3] base-files: failsafe: Remove the VLAN modifier from interface name

Hauke Mehrtens hauke at hauke-m.de
Sat Jun 19 11:36:11 PDT 2021


Some interfaces have a VLAN modifier like :t in lan1:t, this modifier
should be removed from the interface before calling preinit_ip_config().

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/base-files/files/lib/preinit/10_indicate_preinit | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
index a3bc289dd663..2fa812e91f73 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -103,6 +103,8 @@ preinit_config_board() {
 	else
 		# trim any vlan ids
 		ports=${ports%\.*}
+		# trim any vlan modifiers like :t
+		ports=${ports%\:*}
 	fi
 
 	pi_ifname=$ports
-- 
2.30.2




More information about the openwrt-devel mailing list