imx6: fix platform checking
[openwrt.git] / target / linux / imx6 / base-files / etc / uci-defaults / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2013 OpenWrt.org
4 #
5
6 [ -e /etc/config/network ] && exit 0
7
8 touch /etc/config/network
9
10 . /lib/functions/uci-defaults.sh
11 . /lib/imx6.sh
12
13 board=$(imx6_board_name)
14
15 ucidef_set_interface_loopback
16
17 case "$board" in
18 *gw51xx |\
19 *gw52xx)
20         ucidef_set_interface_lan 'eth0'
21         ;;
22 *gw53xx |\
23 *gw54xx |\
24 *gw552x)
25         ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
26         ;;
27 *wandboard)
28         ucidef_set_interface_wan 'eth0'
29         ;;
30 esac
31
32 uci commit network
33
34 exit 0