If insertion of the switch-core module failed, there's no use trying
the various hardware specific ones and wasting 1 seconds on each.

Signed-off-by: Ferenc Wagner <[email protected]>

Index: target/linux/brcm-2.4/base-files/etc/preinit.arch
===================================================================
--- target/linux/brcm-2.4/base-files/etc/preinit.arch   (revision 16393)
+++ target/linux/brcm-2.4/base-files/etc/preinit.arch   (working copy)
@@ -48,10 +48,12 @@
   return $?
 }
 
-insmod switch-core
-check_module switch-robo || check_module switch-adm  || { 
-  check_module bcm57xx activate_gpio=0x4 && cpu_port="8u*"
-} || rmmod switch-core
+if insmod switch-core; then
+  check_module switch-robo ||
+  check_module switch-adm || 
+  check_module bcm57xx activate_gpio=0x4 && cpu_port="8u*" ||
+  rmmod switch-core
+fi
 
 [ -d /proc/switch/eth0 ] && {
        echo 1 > /proc/switch/eth0/reset
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to