git: 9front

Download patch

ref: 1bbf61d866494df230279aa06ea5da0cec6e07d3
parent: 19b3a26aa85e2f1f1a8134ccd1963b9b89e59e53
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}
--