02_network 471 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. . /lib/functions.sh
  3. . /lib/mediatek.sh
  4. . /lib/functions/uci-defaults.sh
  5. . /lib/functions/system.sh
  6. mediatek_setup_interfaces()
  7. {
  8. local board="$1"
  9. case $board in
  10. eMMC | \
  11. NAND | \
  12. mt7623_evb)
  13. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  14. ucidef_add_switch "switch0" \
  15. "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" "5@eth1"
  16. ;;
  17. esac
  18. }
  19. board_config_update
  20. board=$(mediatek_board_name)
  21. mediatek_setup_interfaces $board
  22. board_config_flush
  23. exit 0