02_network 810 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2012-2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/functions/system.sh
  7. board_config_update
  8. board=$(board_name)
  9. case "$board" in
  10. "dockstar"|\
  11. "goflexhome"|\
  12. "goflexnet"|\
  13. "ib62x0"|\
  14. "iconnect"|\
  15. "nsa310s"|\
  16. "pogo_e02"|\
  17. "sheevaplug"|\
  18. "sheevaplug-esata")
  19. ucidef_set_interface_lan "eth0" "dhcp"
  20. ;;
  21. "guruplug-server-plus")
  22. ucidef_set_interface_lan "eth0 eth1" "dhcp"
  23. ;;
  24. "linksys-audi"|\
  25. "linksys-viper")
  26. ucidef_add_switch "switch0" \
  27. "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" "6@eth1"
  28. ;;
  29. "nsa310b"|"nsa325")
  30. ucidef_set_interface_lan "eth0" "dhcp"
  31. ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
  32. ;;
  33. "on100")
  34. ucidef_set_interface_lan "eth0 eth1"
  35. ;;
  36. *)
  37. ucidef_set_interface_lan "eth0"
  38. ;;
  39. esac
  40. board_config_flush
  41. exit 0