05_set_preinit_iface 846 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. set_preinit_iface() {
  2. case $(board_name) in
  3. cudy,m3000-v1|\
  4. cudy,tr3000-256mb-v1|\
  5. cudy,tr3000-v1|\
  6. cudy,tr3000-v1-ubootmod|\
  7. glinet,gl-mt2500|\
  8. glinet,gl-mt3000|\
  9. openembed,som7981|\
  10. wavlink,wl-wn573hx3)
  11. ip link set eth1 up
  12. ifname=eth1
  13. ;;
  14. cudy,ap3000outdoor-v1|\
  15. cudy,re3000-v1|\
  16. ubnt,unifi-6-lr|\
  17. zyxel,nwa50ax-pro)
  18. ip link set eth0 up
  19. ifname=eth0
  20. ;;
  21. smartrg,sdg-841-t6|\
  22. smartrg,sdg-8622|\
  23. smartrg,sdg-8632|\
  24. smartrg,sdg-8733a)
  25. ip link set lan up
  26. ifname=lan
  27. ;;
  28. xiaomi,mi-router-ax3000t|\
  29. xiaomi,mi-router-ax3000t-ubootmod|\
  30. xiaomi,mi-router-wr30u-stock|\
  31. xiaomi,mi-router-wr30u-ubootmod|\
  32. xiaomi,redmi-router-ax6000-stock|\
  33. xiaomi,redmi-router-ax6000-ubootmod)
  34. ip link set eth0 up
  35. ifname=lan4
  36. ;;
  37. *)
  38. ip link set eth0 up
  39. ifname=lan1
  40. ;;
  41. esac
  42. }
  43. boot_hook_add preinit_main set_preinit_iface