x86: Add board configs for the PC Engines APU2
[openwrt/openwrt.git] / target / linux / x86 / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright © 2017 OpenWrt.org
4 #
5
6 . /lib/functions/system.sh
7 . /lib/functions/uci-defaults.sh
8
9 board_config_update
10
11 board="$(cat /tmp/sysinfo/board_name)" 2>/dev/null
12
13 case "$board" in
14 pc-engines-apu2)
15 ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
16 ;;
17 traverse-technologies-geos)
18 ucidef_set_interface_lan "eth0 eth1"
19 ucidef_add_atm_bridge "0" "35" "llc" "bridged"
20 ucidef_set_interface_wan "nas0" "dhcp"
21 macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
22 [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
23 ;;
24 esac
25 board_config_flush
26
27 exit 0