opkg: fix stray \ warnings with grep-3.8
[openwrt/openwrt.git] / target / linux / x86 / base-files / etc / board.d / 02_network
1 #
2 # Copyright © 2017 OpenWrt.org
3 #
4
5 . /lib/functions/system.sh
6 . /lib/functions/uci-defaults.sh
7
8 board_config_update
9
10 case "$(board_name)" in
11 barracuda-networks-inc-barracuda-ng-firewall-f12)
12 ucidef_set_network_device_path "eth1" "pci0000:00/0000:00:14.0/0000:01:00.0"
13 ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:14.1/0000:02:00.0"
14 ucidef_set_network_device_path "eth3" "pci0000:00/0000:00:13.0/0000:03:00.0"
15 ucidef_set_network_device_path "eth4" "pci0000:00/0000:00:13.1/0000:04:00.0"
16 ucidef_set_network_device_path "eth5" "pci0000:00/0000:00:13.2/0000:05:00.0"
17 ucidef_set_interfaces_lan_wan "eth2 eth3 eth4 eth5" "eth1"
18 ;;
19 cisco-mx100-hw)
20 ucidef_set_network_device_path "mgmt" "pci0000:00/0000:00:01.2/0000:03:00.3"
21 ucidef_set_network_device_path "wan" "pci0000:00/0000:00:01.2/0000:03:00.2"
22 ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:01.2/0000:03:00.1"
23 ucidef_set_network_device_path "eth3" "pci0000:00/0000:00:01.2/0000:03:00.0"
24 ucidef_set_network_device_path "eth4" "pci0000:00/0000:00:01.0/0000:01:00.2"
25 ucidef_set_network_device_path "eth5" "pci0000:00/0000:00:01.0/0000:01:00.1"
26 ucidef_set_network_device_path "eth6" "pci0000:00/0000:00:01.0/0000:01:00.4"
27 ucidef_set_network_device_path "eth7" "pci0000:00/0000:00:01.0/0000:01:00.3"
28 ucidef_set_network_device_path "eth8" "pci0000:00/0000:00:01.1/0000:02:00.1"
29 ucidef_set_network_device_path "eth9" "pci0000:00/0000:00:01.1/0000:02:00.0"
30 ucidef_set_network_device_path "eth10" "pci0000:00/0000:00:01.1/0000:02:00.3"
31 ucidef_set_network_device_path "eth11" "pci0000:00/0000:00:01.1/0000:02:00.2"
32 ucidef_set_interfaces_lan_wan "mgmt eth2 eth3 eth4 eth5 eth6 eth7 eth8 eth9 eth10 eth11" "wan"
33 ;;
34 pc-engines-apu1|pc-engines-apu2|pc-engines-apu3)
35 ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
36 ;;
37 pc-engines-apu5)
38 ucidef_set_interfaces_lan_wan "eth1" "eth0"
39 ;;
40 pc-engines-apu4|pc-engines-apu6)
41 ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0"
42 ;;
43 roqos-roqos-core-rc10)
44 ucidef_set_interfaces_lan_wan "eth1" "eth0"
45 ;;
46 sophos-sg-105r1|sophos-xg-105r1| \
47 sophos-sg-105wr1|sophos-xg-105wr1| \
48 sophos-sg-105r2|sophos-xg-105r2| \
49 sophos-sg-105wr2|sophos-xg-105wr2| \
50 sophos-sg-115r1|sophos-xg-115r1| \
51 sophos-sg-115wr1|sophos-xg-115wr1| \
52 sophos-sg-115r2|sophos-xg-115r2| \
53 sophos-sg-115wr2|sophos-xg-115wr2| \
54 sophos-xg-85*|sophos-xg-86*)
55 ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
56 ;;
57 sophos-sg-125r1|sophos-xg-125r1| \
58 sophos-sg-125wr1|sophos-xg-125wr1| \
59 sophos-sg-125r2|sophos-xg-125r2| \
60 sophos-sg-125wr2|sophos-xg-125wr2| \
61 sophos-sg-135r1|sophos-xg-135r1| \
62 sophos-sg-135wr1|sophos-xg-135wr1| \
63 sophos-sg-135r2|sophos-xg-135r2| \
64 sophos-sg-135wr2|sophos-xg-135wr2)
65 ucidef_set_interfaces_lan_wan "eth0 eth2 eth3 eth4 eth5 eth6 eth7" "eth1"
66 ;;
67 sophos-sg-135r3|sophos-xg-135r3| \
68 sophos-sg-135wr3|sophos-xg-135wr3)
69 ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth5 eth7 eth8" "eth6"
70 ;;
71 traverse-technologies-geos)
72 ucidef_set_interface_lan "eth0 eth1"
73 ucidef_add_atm_bridge "0" "35" "llc" "bridged"
74 ucidef_set_interface_wan "nas0" "dhcp"
75 macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
76 [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
77 ;;
78 silicom-80500-0214-*)
79 ucidef_set_network_device_path "wan0" "pci0000:00/0000:00:16.0/0000:03:00.0"
80 ucidef_set_network_device_path "wan1" "pci0000:00/0000:00:16.0/0000:03:00.1"
81 ucidef_set_network_device_path "media0" "pci0000:00/0000:00:17.0/0000:02:00.1"
82 ucidef_set_network_device_path "media1" "pci0000:00/0000:00:17.0/0000:02:00.0"
83 ucidef_set_network_device_path "eth0" "pci0000:00/0000:00:0c.0/0000:04:00.0"
84 ucidef_set_network_device_path "eth1" "pci0000:00/0000:00:0e.0/0000:05:00.0"
85 ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:0f.0/0000:06:00.0"
86 ucidef_set_network_device_path "eth3" "pci0000:00/0000:00:10.0/0000:07:00.0"
87 ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3" "wan0"
88 ;;
89 esac
90 board_config_flush
91
92 exit 0