x86: fix support for Sophos SG/XG wireless products
[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 cisco-mx100-hw)
12 ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth4 eth5 eth7 eth8 eth9 eth10 eth11" "eth6"
13 ;;
14 pc-engines-apu1|pc-engines-apu2|pc-engines-apu3)
15 ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
16 ;;
17 roqos-roqos-core-rc10)
18 ucidef_set_interfaces_lan_wan "eth1" "eth0"
19 ;;
20 sophos-sg-105r1|sophos-xg-105r1| \
21 sophos-sg-105wr1|sophos-xg-105wr1| \
22 sophos-sg-105r2|sophos-xg-105r2| \
23 sophos-sg-105wr2|sophos-xg-105wr2| \
24 sophos-sg-115r1|sophos-xg-115r1| \
25 sophos-sg-115wr1|sophos-xg-115wr1| \
26 sophos-sg-115r2|sophos-xg-115r2| \
27 sophos-sg-115wr2|sophos-xg-115wr2)
28 ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1"
29 ;;
30 sophos-sg-125r1|sophos-xg-125r1| \
31 sophos-sg-125wr1|sophos-xg-125wr1| \
32 sophos-sg-125r2|sophos-xg-125r2| \
33 sophos-sg-125wr2|sophos-xg-125wr2| \
34 sophos-sg-135r1|sophos-xg-135r1| \
35 sophos-sg-135wr1|sophos-xg-135wr1| \
36 sophos-sg-135r2|sophos-xg-135r2| \
37 sophos-sg-135wr2|sophos-xg-135wr2)
38 ucidef_set_interfaces_lan_wan "eth0 eth2 eth3 eth4 eth5 eth6 eth7" "eth1"
39 ;;
40 traverse-technologies-geos)
41 ucidef_set_interface_lan "eth0 eth1"
42 ucidef_add_atm_bridge "0" "35" "llc" "bridged"
43 ucidef_set_interface_wan "nas0" "dhcp"
44 macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
45 [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
46 ;;
47 esac
48 board_config_flush
49
50 exit 0