1#!/bin/sh 2 3set_preinit_iface() { 4 ifname=eth1 5 6 . /lib/brcm63xx.sh 7 8 ifconfig $ifname 0.0.0.0 up 9} 10 11check_module () { 12 module="$1"; shift; params="$*" 13 14 insmod "$module" "$params" 15 sleep 1 16 grep "^$module" /proc/modules 17 return $? 18} 19 20init_iface() { 21 insmod switch-core 22 check_module switch-robo || check_module switch-adm || rmmod switch-core 23} 24 25boot_hook_add preinit_main set_preinit_iface 26boot_hook_add preinit_main init_iface 27