02_network 480 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # Copyright (C) 2014-2015 OpenWrt.org
  3. . /lib/functions/uci-defaults.sh
  4. . /lib/mpc85xx.sh
  5. . /lib/functions.sh
  6. . /lib/functions/system.sh
  7. board_config_update
  8. board=$(mpc85xx_board_name)
  9. case "$board" in
  10. tl-wdr4900-v1)
  11. ucidef_add_switch "switch0" \
  12. "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
  13. ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary config 332)"
  14. ;;
  15. *)
  16. ucidef_set_interfaces_lan_wan "eth0" "eth1"
  17. ;;
  18. esac
  19. board_config_flush
  20. exit 0