3 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
4 # Copyright (c) 2011-2015 OpenWrt.org
7 .
/lib
/functions
/uci-defaults.sh
8 .
/lib
/functions
/system.sh
17 wan_mac_addr
=$
(mtd_get_mac_binary_ubi Factory
20486)
18 lan_mac_addr
=$
(mtd_get_mac_binary_ubi Factory
4102)
19 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
20 ucidef_add_switch
"switch0" \
21 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
22 ucidef_set_interface_macaddr
"lan" "$lan_mac_addr"
23 ucidef_set_interface_macaddr
"wan" "$wan_mac_addr"
26 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
27 ucidef_add_switch
"switch0" \
28 "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
31 ucidef_set_interfaces_lan_wan
"eth0" "eth1"
32 ucidef_add_switch
"switch0" \
33 "0u@eth0" "3:lan" "4:lan"
36 ucidef_set_interfaces_lan_wan
"eth1" "eth0"
39 echo "Unsupported hardware. Network interfaces not intialized"