octeon: add basic board detection
[openwrt/openwrt.git] / target / linux / octeon / base-files / etc / uci-defaults / 01_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2014 OpenWrt.org
4 #
5
6 [ -e /etc/config/network ] && exit 0
7
8 . /lib/functions/uci-defaults.sh
9 . /lib/functions/octeon.sh
10
11 touch /etc/config/network
12
13 board=$(octeon_board_name)
14
15 case "$board" in
16 erlite)
17 ucidef_set_interface_loopback
18 ucidef_set_interface_lan 'eth0'
19 ucidef_set_interface_wan 'eth1'
20 ;;
21
22 *)
23 ucidef_set_interface_loopback
24 ucidef_set_interface_wan 'eth1'
25 ucidef_set_interface_lan 'eth0'
26 ;;
27 esac
28
29 uci commit network
30
31 exit 0