ramips: mt7621: bringup dsa master on preinit
[openwrt/openwrt.git] / target / linux / ramips / mt7621 / base-files / lib / preinit / 07_mt7621_bringup_dsa_master
1 #!/bin/sh
2
3 . /lib/functions.sh
4
5 mt7621_bringup_dsa_master() {
6 local board=$(board_name)
7 local masterif
8
9 case "$board" in
10 ubiquiti,edgerouterx|\
11 ubiquiti,edgerouterx-sfp)
12 masterif="dsa"
13 ;;
14 *)
15 masterif="eth0"
16 ;;
17 esac
18
19 ifconfig $masterif up
20 }
21
22 boot_hook_add preinit_main mt7621_bringup_dsa_master