From 343d0f3d0efaf486ddc676130786d95fc06f682c Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Mon, 3 Jul 2006 20:27:23 +0000 Subject: 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 --- initrd/initrd-stuff/etc/functions | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'initrd/initrd-stuff/etc/functions') 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 } ####################################################################### -- cgit v1.2.3-55-g7522