[ar7] add a default network config file, patch from Wipster
[openwrt.git] / target / linux / ar7 / base-files / etc / uci-defaults / network
1 #!/bin/sh
2 if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175A/1:00" -o \
3 -e "/sys/bus/mdio_bus/drivers/IC+ IP17xx/1:00" ] && \
4 [ -x /sbin/swconfig ];
5 then
6 uci batch <<EOF
7 set network.eth0=switch
8 set network.eth0.name=eth0
9 set network.eth0.reset=1
10 set network.eth0.enable_vlan=1
11 set network.eth0_1=switch_vlan
12 set network.eth0_1.device=eth0
13 set network.eth0_1.vlan=1
14 set network.eth0_1.ports="0 1 2 3 4t"
15 commit network
16 EOF
17 HAS_SWITCH=1
18 fi
19
20 if [ -n "$HAS_SWITCH" -o \
21 -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/1:00" -o \
22 -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/1:10" ]; then
23 uci batch <<EOF
24 set network.lan.ifname=eth0.1
25 commit network
26 EOF
27 HAS_SWITCH=1
28 fi
29
30 uci commit network
This page took 0.040287 seconds and 5 git commands to generate.