05_set_preinit_iface 979 B

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