diff options
author | Dirk von Suchodoletz | 2007-01-31 20:11:02 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-01-31 20:11:02 +0100 |
commit | 1ad51ac519e7afc970a5ddf991c9141e140bf7f3 (patch) | |
tree | 2b35cf904a5e029ee2da9a355976a47d7c6ab670 /initramfs/initrd-stuff/etc/functions | |
parent | Use the right variable name of the existing path. (diff) | |
download | core-1ad51ac519e7afc970a5ddf991c9141e140bf7f3.tar.gz core-1ad51ac519e7afc970a5ddf991c9141e140bf7f3.tar.xz core-1ad51ac519e7afc970a5ddf991c9141e140bf7f3.zip |
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
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 10 |
1 files changed, 7 insertions, 3 deletions
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 |