projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
atheros: configure eth1 as wan interface by default, if present
[openwrt.git]
/
target
/
linux
/
atheros
/
base-files
/
etc
/
uci-defaults
/
network
diff --git
a/target/linux/atheros/base-files/etc/uci-defaults/network
b/target/linux/atheros/base-files/etc/uci-defaults/network
index
4f6ff61
..
68b9a2a
100644
(file)
--- a/
target/linux/atheros/base-files/etc/uci-defaults/network
+++ b/
target/linux/atheros/base-files/etc/uci-defaults/network
@@
-8,6
+8,7
@@
set network.wan=interface
set network.wan.ifname=eth0.2
set network.wan.proto=dhcp
EOF
set network.wan.ifname=eth0.2
set network.wan.proto=dhcp
EOF
+ HAS_SWITCH=1
fi
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" ]; then
fi
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" ]; then
@@
-24,6
+25,15
@@
set network.eth0_2.device=eth0
set network.eth0_2.vlan=2
set network.eth0_2.ports="4 5t"
EOF
set network.eth0_2.vlan=2
set network.eth0_2.ports="4 5t"
EOF
+ HAS_SWITCH=1
fi
fi
+[ -z "$HAS_SWITCH" -a -d /sys/class/net/eth1 ] && {
+ uci batch <<EOF
+set network.wan=interface
+set network.wan.ifname=eth1
+set network.wan.proto=dhcp
+EOF
+}
+
uci commit network
uci commit network
This page took
0.023007 seconds
and
4
git commands to generate.