diff options
Diffstat (limited to 'target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx')
-rw-r--r-- | target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx new file mode 100644 index 000000000..b7cbecd4f --- /dev/null +++ b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx @@ -0,0 +1,26 @@ +#!/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 |