From: Felix Fietkau Date: Tue, 28 Apr 2009 23:27:46 +0000 (+0000) Subject: atheros: configure eth1 as wan interface by default, if present X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=8fd82f5e97cbf938ab5419afdb5a2a6d501fa119;hp=3cf662ce722ceeb19c98bd767bb1f8785205c537 atheros: configure eth1 as wan interface by default, if present SVN-Revision: 15473 --- diff --git a/target/linux/atheros/base-files/etc/uci-defaults/network b/target/linux/atheros/base-files/etc/uci-defaults/network index 4f6ff61790..68b9a2a27d 100644 --- 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 + HAS_SWITCH=1 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 + HAS_SWITCH=1 fi +[ -z "$HAS_SWITCH" -a -d /sys/class/net/eth1 ] && { + uci batch <