aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master b/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master
new file mode 100644
index 0000000000..7a11252168
--- /dev/null
+++ b/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+. /lib/functions.sh
+
+mt7621_bringup_dsa_master() {
+ local board=$(board_name)
+ local masterif
+
+ case "$board" in
+ ubiquiti,edgerouterx|\
+ ubiquiti,edgerouterx-sfp)
+ masterif="dsa"
+ ;;
+ *)
+ masterif="eth0"
+ ;;
+ esac
+
+ ifconfig $masterif up
+}
+
+boot_hook_add preinit_main mt7621_bringup_dsa_master \ No newline at end of file