[xburst] Fix usb gadget driver build
[openwrt.git] / target / linux / atheros / base-files / etc / uci-defaults / network
1 #!/bin/sh
2 if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" -a -x /sbin/swconfig ]; then
3 uci batch <<EOF
4 set network.eth0=switch
5 set network.eth0.name=eth0
6 set network.eth0.reset=1
7 set network.eth0.enable_vlan=1
8 set network.eth0_1=switch_vlan
9 set network.eth0_1.device=eth0
10 set network.eth0_1.vlan=1
11 set network.eth0_1.ports="0 1 2 3 5t"
12 set network.eth0_2=switch_vlan
13 set network.eth0_2.device=eth0
14 set network.eth0_2.vlan=2
15 set network.eth0_2.ports="4 5t"
16 EOF
17 HAS_SWITCH=1
18 fi
19
20 if [ -n "$HAS_SWITCH" -o \
21 -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
22 -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then
23 uci batch <<EOF
24 set network.lan.ifname=eth0.1
25 set network.wan=interface
26 set network.wan.ifname=eth0.2
27 set network.wan.proto=dhcp
28 commit network
29 EOF
30 HAS_SWITCH=1
31 fi
32
33 [ -z "$HAS_SWITCH" -a -d /sys/class/net/eth1 ] && {
34 uci batch <<EOF
35 set network.wan=interface
36 set network.wan.ifname=eth1
37 set network.wan.proto=dhcp
38 commit network
39 EOF
40 }
41
42 uci commit network
This page took 0.052447 seconds and 5 git commands to generate.