05_init_interfaces_brcm63xx 435 B

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