summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/initrd-stuff/etc/functions')
-rw-r--r--initrd/initrd-stuff/etc/functions12
1 files changed, 8 insertions, 4 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index 8565281c..e48d52bc 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -96,11 +96,15 @@ msg () {
echo -e "$1 info: $2"
}
#######################################################################
-# micro sleep - simply loop and delete 1 from the first argument gotten
-# until zero
+# micro sleep - either busybox command or simply loop and delete 1 from
+# the first argument gotten until zero
usleep () {
-local count=`expr $1 \* 10`
-while [ $count -gt 0 ] ; do count=`expr $count \- 1` ; done
+if [ -x /bin/usleep ]; then
+ /bin/usleep `expr $1 \* 80000`
+else
+ local count=`expr $1 \* 10`
+ while [ $count -gt 0 ] ; do count=`expr $count \- 1` ; done
+fi
return 0
}
#######################################################################