1#!/bin/sh 2 3. /lib/functions/uci-defaults.sh 4 5board_config_update 6 7if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175A/1:00" -o \ 8 -e "/sys/bus/mdio_bus/drivers/IC+ IP17xx/1:00" ] && \ 9 [ -x /sbin/swconfig ]; 10then 11 ucidef_add_switch "eth0" \ 12 "0:lan" "1:lan" "2:lan" "3:lan" "4t@eth0" 13 14elif [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/1:00" -o \ 15 -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/1:10" ]; 16then 17 ucidef_set_interface_lan "eth0.1" 18 19elif [ -d "/sys/class/net/eth1" ]; then 20 ucidef_set_interface_lan "eth0 eth1" 21 22else 23 ucidef_set_interface_lan "eth0" 24fi 25 26board_config_flush 27 28exit 0 29