source: trunk/target/linux/ar7/base-files/etc/uci-defaults/network @ 25647

Last change on this file since 25647 was 25647, checked in by florian, 6 years ago

[ar7] add a default network config file, patch from Wipster

File size: 694 bytes
Line 
1#!/bin/sh
2if [ -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 ];
5then
6        uci batch <<EOF
7set network.eth0=switch
8set network.eth0.name=eth0
9set network.eth0.reset=1
10set network.eth0.enable_vlan=1
11set network.eth0_1=switch_vlan
12set network.eth0_1.device=eth0
13set network.eth0_1.vlan=1
14set network.eth0_1.ports="0 1 2 3 4t"
15commit network
16EOF
17        HAS_SWITCH=1
18fi
19
20if [ -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
24set network.lan.ifname=eth0.1
25commit network
26EOF
27        HAS_SWITCH=1
28fi
29
30uci commit network
Note: See TracBrowser for help on using the repository browser.