05_set_preinit_iface 264 B

12345678910111213141516171819
  1. set_preinit_iface() {
  2. case $(board_name) in
  3. glinet,gl-mt3000)
  4. ip link set eth1 up
  5. ifname=eth1
  6. ;;
  7. ubnt,unifi-6-lr)
  8. ip link set eth0 up
  9. ifname=eth0
  10. ;;
  11. *)
  12. ip link set eth0 up
  13. ifname=lan1
  14. ;;
  15. esac
  16. }
  17. boot_hook_add preinit_main set_preinit_iface