diff options
author | Dirk von Suchodoletz | 2007-08-04 00:55:58 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-08-04 00:55:58 +0200 |
commit | 820392a4b6faf364c730f97e0cc26db5bab214e5 (patch) | |
tree | be0d6c03f3a61428b9199a4e35c051201d04a4fa /initramfs/initrd-stuff/init | |
parent | Raw concept of cd-demo initramfs generation and init script are done, (diff) | |
download | core-820392a4b6faf364c730f97e0cc26db5bab214e5.tar.gz core-820392a4b6faf364c730f97e0cc26db5bab214e5.tar.xz core-820392a4b6faf364c730f97e0cc26db5bab214e5.zip |
Stop trying after a while if nbd-client could not be started properly
(slx init), small mkdxsinitrd modification for cd-boot initramfs.
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1317 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-x | initramfs/initrd-stuff/init | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index ccc0528d..f1f99770 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -422,8 +422,13 @@ if [ -n "${bldmod}" ] ; then nbd) RDEV=/dev/nbd0 waitfor "${RDEV}" 20000 || error "$init_nbddev" + i=0 while ! nbd-client $bldhost $bldport ${RDEV} ; do - usleep 10000 + usleep 100000 + i=$(($i + 1)) + if [ $i -ge 1000 ] ; then + error "$init_nbds"; break + fi done usleep 100 echo noop > /sys/block/nbd0/queue/scheduler |