diff options
author | Dirk von Suchodoletz | 2007-04-28 14:23:13 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-04-28 14:23:13 +0200 |
commit | ffd1f029b11a1c41c942901880e46702fbd38dca (patch) | |
tree | 8c900b51a5ec74e09a73e03df2963e7fc8eded6f /initramfs | |
parent | Solution for ext2 formatter ... (see ticket #117 too) (diff) | |
download | core-ffd1f029b11a1c41c942901880e46702fbd38dca.tar.gz core-ffd1f029b11a1c41c942901880e46702fbd38dca.tar.xz core-ffd1f029b11a1c41c942901880e46702fbd38dca.zip |
Simplification of (u)sleep (applets in busybox)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@938 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index aef02ad8..f42c4d0b 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -112,37 +112,6 @@ uptime=$(sed -e "s, .*,," /proc/uptime) echo "${uptime} s." # if start times are kept, a summary of runtimes would be possible too } - - -############################################################################# -# micro sleep - argument takes number of milliseconds. either busybox command -# or simply use uptime information -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 - # burn some cycles - while [ $i -le 100 ] ; do - i=$(expr 1 + $i) - done - done -fi -return 0 -} -# standard sleep command -sleep () { -if [ -x /bin/sleep ]; then - /bin/sleep $1 -#elif [ -x /bin/bash ]; then -# TMOUT=$1 read -else - usleep `expr $1 \* 1000` -fi -} ############################################################################# # (re)generate dynamic linked libraries cache from /etc/ld.so.conf ldcfg () { @@ -389,7 +358,7 @@ fi rundhcp () { local vci="$1" -for dhcp in dhclient dhcpcd pump udhcpc none; do +for dhcp in dhclient dhcpcd udhcpc none; do test -e /bin/$dhcp && break; done if [ "$dhcp" = "none" ] ; then |