diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-04 14:15:09 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-12-04 14:15:09 +0000 |
commit | dace8ddb12fef77b6c46425d30b1f1e01f0f65a8 (patch) | |
tree | 458cdf884587a4814dc2c99d413d6246828bdc3b /target/linux/ath25/base-files/etc/board.d/02_network | |
parent | 49a802ad2b856e48edd49d770a3a57bd3dd7eb91 (diff) | |
download | master-187ad058-dace8ddb12fef77b6c46425d30b1f1e01f0f65a8.tar.gz master-187ad058-dace8ddb12fef77b6c46425d30b1f1e01f0f65a8.tar.bz2 master-187ad058-dace8ddb12fef77b6c46425d30b1f1e01f0f65a8.zip |
ath25: switch from uci-defaults to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47756 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ath25/base-files/etc/board.d/02_network')
-rwxr-xr-x | target/linux/ath25/base-files/etc/board.d/02_network | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/ath25/base-files/etc/board.d/02_network b/target/linux/ath25/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..b2781bf4cb --- /dev/null +++ b/target/linux/ath25/base-files/etc/board.d/02_network @@ -0,0 +1,28 @@ +#!/bin/sh + +. /lib/functions/uci-defaults-new.sh + +board_config_update + +if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" -o \ + -e "/sys/bus/mdio_bus/drivers/IC+ IP17xx/0:00" ] && \ + [ -x /sbin/swconfig ]; +then + ucidef_add_switch "eth0" \ + "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" + +elif [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \ + -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; +then + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" + +elif [ -d /sys/class/net/eth1 ]; then + ucidef_set_interfaces_lan_wan "eth0" "eth1" + +else + ucidef_set_interface_lan "eth0" +fi + +board_config_flush + +exit 0 |