summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/functions
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-07-03 22:27:23 +0200
committerDirk von Suchodoletz2006-07-03 22:27:23 +0200
commit343d0f3d0efaf486ddc676130786d95fc06f682c (patch)
tree4f036b493d07325cdfa748fa558916311438ca5c /initrd/initrd-stuff/etc/functions
parentJust check in - do not use this version. (diff)
downloadcore-343d0f3d0efaf486ddc676130786d95fc06f682c.tar.gz
core-343d0f3d0efaf486ddc676130786d95fc06f682c.tar.xz
core-343d0f3d0efaf486ddc676130786d95fc06f682c.zip
Enhanced debugging settings (see DebugLevel), some fixes for the use
with busybox, ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@267 95ad53e4-c205-0410-b2fa-d234c58c8868
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
}
#######################################################################