1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-19 10:58:59 +03:00
openwrt-xburst/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
cshore 05bb6a9dac brcm63xx: Fixed vlan packet leakage in preinit for known devices with a switch on eth1 (currently only 96348GW - Tecom 6x00)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21629 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 01:33:20 +00:00

27 lines
435 B
Bash

#!/bin/sh
set_preinit_iface() {
ifname=eth1
. /lib/brcm63xx.sh
ifconfig $ifname 0.0.0.0 up
}
check_module () {
module="$1"; shift; params="$*"
insmod "$module" "$params"
sleep 1
grep "^$module" /proc/modules
return $?
}
init_iface() {
insmod switch-core
check_module switch-robo || check_module switch-adm || rmmod switch-core
}
boot_hook_add preinit_main set_preinit_iface
boot_hook_add preinit_main init_iface