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 00000000000..7a112521685 --- /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