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