02_network 672 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. #
  3. # Copyright (c) 2015 The Linux Foundation. All rights reserved.
  4. # Copyright (c) 2011-2015 OpenWrt.org
  5. #
  6. . /lib/functions/uci-defaults.sh
  7. . /lib/functions/system.sh
  8. board_config_update
  9. board=$(board_name)
  10. case "$board" in
  11. avm,fritzbox-4040)
  12. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  13. ucidef_add_switch "switch0" \
  14. "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
  15. ;;
  16. glinet,gl-b1300)
  17. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  18. ucidef_add_switch "switch0" \
  19. "0u@eth0" "3:lan" "4:lan"
  20. ;;
  21. openmesh,a42)
  22. ucidef_set_interfaces_lan_wan "eth1" "eth0"
  23. ;;
  24. *)
  25. echo "Unsupported hardware. Network interfaces not intialized"
  26. ;;
  27. esac
  28. board_config_flush
  29. exit 0