From ea3930cfcb4567f531b064a5082af652aa6dcf96 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 14 Mar 2022 23:00:07 +0100 Subject: [PATCH] ipq807x: set interface for failsafe Now that failsafe actually has working network interfaces, we need to set the correct interface that is desired to serve for failsafe. So, set the interfaces using the LAN networking config, it may need tweaking. Signed-off-by: Robert Marko --- .../preinit/06_set_preinit_iface_ipq807x.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/ipq807x/base-files/lib/preinit/06_set_preinit_iface_ipq807x.sh diff --git a/target/linux/ipq807x/base-files/lib/preinit/06_set_preinit_iface_ipq807x.sh b/target/linux/ipq807x/base-files/lib/preinit/06_set_preinit_iface_ipq807x.sh new file mode 100644 index 00000000000000..67008f565430c0 --- /dev/null +++ b/target/linux/ipq807x/base-files/lib/preinit/06_set_preinit_iface_ipq807x.sh @@ -0,0 +1,19 @@ +set_preinit_iface() { + . /lib/functions.sh + + case $(board_name) in + edgecore,eap102|\ + redmi,ax6|\ + xiaomi,ax3600) + ifname=eth1 + ;; + qnap,301w) + ifname=eth3 + ;; + *) + ifname=eth0 + ;; + esac +} + +boot_hook_add preinit_main set_preinit_iface