02_network 884 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2014-2016 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/mvebu.sh
  7. board_config_update
  8. board=$(mvebu_board_name)
  9. case "$board" in
  10. armada-385-linksys-caiman|\
  11. armada-385-linksys-cobra|\
  12. armada-385-linksys-rango|\
  13. armada-385-linksys-shelby)
  14. ucidef_set_interfaces_lan_wan "eth1" "eth0"
  15. ucidef_add_switch "switch0" \
  16. "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "6@eth1" "4:wan" "5@eth0"
  17. ;;
  18. armada-xp-linksys-mamba)
  19. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  20. ucidef_add_switch "switch0" \
  21. "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1"
  22. ;;
  23. armada-385-db-ap)
  24. ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
  25. ;;
  26. armada-xp-gp)
  27. ucidef_set_interface_lan "eth0 eth1 eth2 eth3"
  28. ;;
  29. armada-388-clearfog)
  30. ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2"
  31. ;;
  32. *)
  33. ucidef_set_interface_lan "eth0"
  34. ;;
  35. esac
  36. board_config_flush
  37. exit 0