02_network 600 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # Copyright © 2017 OpenWrt.org
  4. #
  5. . /lib/functions/system.sh
  6. . /lib/functions/uci-defaults.sh
  7. board_config_update
  8. board="$(cat /tmp/sysinfo/board_name)" 2>/dev/null
  9. case "$board" in
  10. pc-engines-apu|pc-engines-apu2)
  11. ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
  12. ;;
  13. traverse-technologies-geos)
  14. ucidef_set_interface_lan "eth0 eth1"
  15. ucidef_add_atm_bridge "0" "35" "llc" "bridged"
  16. ucidef_set_interface_wan "nas0" "dhcp"
  17. macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
  18. [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
  19. ;;
  20. esac
  21. board_config_flush
  22. exit 0