02_network 767 B

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