shithub: riscv

Download patch

ref: 3f9d92c1a83d6b0fdb49d3986ef5a4cd2a892a57
parent: 1d64be19849086dc1152ef952b1ab32612e2e94c
author: Matthew Veety <mveety@gmail.com>
date: Thu Feb 13 19:11:11 EST 2014

similar to my last commit, but combined the two waits for the usb devices. still configurable, but with usbwait. If usbwait is not defined then it defaults to the original 2 seconds.

--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -58,8 +58,6 @@
 }
 
 mt=()
-. /rc/lib/net.rc
-. /rc/lib/local.rc
 
 fn main{
 	mp=()
@@ -169,7 +167,13 @@
 	nusbrc
 
 # wait for devices to settle down
-sleep 2
+if(~ $#usbwait 1)
+	sleep $usbwait
+if(~ $#usbwait 0)
+	sleep 2
+
+. /rc/lib/net.rc
+. /rc/lib/local.rc
 
 # add partitions and binds
 configlocal
--- a/sys/src/9/boot/net.rc
+++ b/sys/src/9/boot/net.rc
@@ -1,9 +1,6 @@
 #!/bin/rc
 
 fn confignet{
-	if(~ $#netwait 1)
-		sleep $netwait
-
 	must ip/ipconfig -p $*
 	if(~ $#fs 0)
 		fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb}