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
15 buffalo
,wxr-2533dhp |\
22 ucidef_add_switch
"switch0" \
23 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
26 ucidef_set_interface_lan
"eth1 eth2"
27 ucidef_add_switch
"switch0" \
28 "0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
31 hw_mac_addr
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
32 ucidef_add_switch
"switch0" \
33 "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
34 ucidef_set_interface_macaddr
"lan" "$hw_mac_addr"
35 ucidef_set_interface_macaddr
"wan" "$hw_mac_addr"
38 hw_mac_addr
=$
(mtd_get_mac_ascii devinfo hw_mac_addr
)
39 ucidef_add_switch
"switch0" \
40 "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
41 ucidef_set_interface_macaddr
"lan" "$hw_mac_addr"
42 ucidef_set_interface_macaddr
"wan" "$hw_mac_addr"
45 ucidef_add_switch
"switch0" \
46 "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
50 ucidef_add_switch
"switch0" \
51 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
54 ucidef_set_interface_lan
"eth1 eth2 eth3"
55 ucidef_add_switch
"switch0" \
56 "1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
59 hw_mac_addr
=$
(mtd_get_mac_ascii
0:APPSBLENV ethaddr
)
60 ucidef_add_switch
"switch0" \
61 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
62 ucidef_set_interface_macaddr
"lan" "$(macaddr_add $hw_mac_addr 2)"
63 ucidef_set_interface_macaddr
"wan" "$(macaddr_add $hw_mac_addr 3)"
66 echo "Unsupported hardware. Network interfaces not intialized"