From 1ad51ac519e7afc970a5ddf991c9141e140bf7f3 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Wed, 31 Jan 2007 19:11:02 +0000 Subject: Fixed slow stage3 in higher debuglevels (sleep -> usleep in /etc/functions) Heavy rewrite of base scripts init/hwautocfg/servconfig. Moved lots of stuff from hwautocfg to init and servconfig to get a cleaner structure (do not wait for processes of init or servconfig in hwautocfg) Cleanup started, old codefragments will be removed soon ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@661 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'initramfs/initrd-stuff/etc/functions') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 8ecb5db1..ec8803a1 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -92,7 +92,7 @@ if [ -n "$2" ] ; then echo -e "${error_msg}${e_msg}${error_nfe}" >> ${LOGFILE} [ "$DEBUGLEVEL" -gt 1 -a "$DEBUGLEVEL" != 8 ] && \ echo -e "${error_msg}${e_msg}${error_nfe}" - [ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && sleep 10 + [ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && usleep 10 else echo -e "${error_msg}${e_msg}${error_shell}" # load usb modules to have keyboard enabled - they might have to be @@ -124,10 +124,14 @@ usleep () { if [ -x /bin/usleep ]; then /bin/usleep `expr $1 \* 1000` else + local i=0 local starttime=$(sed -e "s, .*,,;s,\.,," /proc/uptime) while [ $(sed -e "s, .*,,;s,\.,," /proc/uptime) -le \ - $(expr $starttime + $1 - 2) ] - do : + $(expr $starttime + $1 - 2) ] ; do + # burn some cycles + while [ $i -le 100 ] ; do + i=$(expr 1 + $i) + done done fi return 0 -- cgit v1.2.3-55-g7522