ffa3b28d149a6f5a11425cd6c99d4f6b6cc111ae
[oweals/openwrt.git] / target / linux / ipq806x / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (c) 2015 The Linux Foundation. All rights reserved.
4 # Copyright (c) 2011-2015 OpenWrt.org
5 #
6
7 . /lib/functions/uci-defaults-new.sh
8 . /lib/ipq806x.sh
9
10 board_config_update
11
12 ucidef_set_interface_loopback
13
14 board=$(ipq806x_board_name)
15
16 case "$board" in
17 ap148 |\
18 r7500)
19         ucidef_add_switch "switch0" \
20                 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
21         ;;
22 db149)
23         ucidef_set_interface_lan "eth1 eth2 eth3"
24         ucidef_add_switch "switch0" \
25                 "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
26         ;;
27 *)
28         echo "Unsupported hardware. Network interfaces not intialized"
29         ;;
30 esac
31
32 board_config_flush
33
34 exit 0