2 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
3 # Copyright (c) 2011-2015 OpenWrt.org
6 . /lib/functions/uci-defaults.sh
7 . /lib/functions/system.sh
17 ucidef_add_switch "switch0" \
18 "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
20 buffalo,wxr-2533dhp |\
27 ucidef_add_switch "switch0" \
28 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
31 ucidef_set_interfaces_lan_wan "eth1" "eth0"
34 hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
35 ucidef_add_switch "switch0" \
36 "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
37 ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
38 ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
41 hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
42 ucidef_add_switch "switch0" \
43 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
44 ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
45 ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
48 ucidef_add_switch "switch0" \
49 "2:lan" "3:lan" "4:lan" "5:lan" "0@eth1" "1:wan" "6@eth0"
54 ucidef_add_switch "switch0" \
55 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
58 ucidef_set_interface_lan "eth1 eth2"
59 ucidef_add_switch "switch0" \
60 "0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
63 ucidef_set_interface_lan "eth1 eth2 eth3"
64 ucidef_add_switch "switch0" \
65 "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
68 ucidef_add_switch "switch0" \
69 "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
72 ucidef_set_interface_lan "eth0 eth1"
75 hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
76 ucidef_add_switch "switch0" \
77 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
78 ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"
79 ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 3)"
82 echo "Unsupported hardware. Network interfaces not intialized"