|
@@ -7,9 +7,18 @@
|
|
|
|
|
|
|
|
board_config_update
|
|
board_config_update
|
|
|
|
|
|
|
|
-ucidef_set_interface_loopback
|
|
|
|
|
|
|
+board=$(cat /proc/device-tree/compatible | tr '\0' '\t' | cut -f 1)
|
|
|
|
|
+case "$board" in
|
|
|
|
|
+netgear,r8000)
|
|
|
|
|
+ ifname=eth2
|
|
|
|
|
+ ;;
|
|
|
|
|
+*)
|
|
|
|
|
+ ifname=eth0
|
|
|
|
|
+ ;;
|
|
|
|
|
+esac
|
|
|
|
|
|
|
|
-ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
|
|
|
|
|
|
|
+ucidef_set_interface_loopback
|
|
|
|
|
+ucidef_set_interfaces_lan_wan "$ifname.1" "$ifname.2"
|
|
|
ucidef_add_switch "switch0" "1" "1"
|
|
ucidef_add_switch "switch0" "1" "1"
|
|
|
|
|
|
|
|
# NVRAM entries may contain unsorted ports, e.g. Netgear R6250 uses
|
|
# NVRAM entries may contain unsorted ports, e.g. Netgear R6250 uses
|