From d50ef1fbbb873ae8fa059255acb8f3d8362b3f71 Mon Sep 17 00:00:00 2001 From: Michael Janczyk Date: Fri, 29 Sep 2006 19:28:19 +0000 Subject: Problem with nbd-client timing fixed in init. Still problem with tftpboot prefix in /etc/functions, so reset to /tftpboot/client-conf as prefix. Please change only if fixed :-) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@415 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 12 +++++++----- initramfs/initrd-stuff/init | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index cefd7a26..7f7f552d 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -2,7 +2,7 @@ # (included by init, hwautocfg, servconfig, ... within OpenSLX initial # ramfs) # -# Dirk von Suchodoletz , 26-09-2006 +# Dirk von Suchodoletz , 29-09-2006 # Felix Endres, 30-04-2006 # (xenbr), 27-09-2006 # Tobias Maier @@ -339,8 +339,9 @@ done if [ "$dhcp" = "none" ] ; then error "$error_nodhcp" nonfatal else - # ensure the interface is up - ipsetup 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 eth0 & + # ensure the interface is up - might produce conflicts - nbd could + # fail!! + # ipsetup 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 eth0 & [ -f /lib/modules/@@@KERNVER@@@/kernel/net/packet/af_packet.ko ] && \ loadmod /lib/modules/@@@KERNVER@@@/kernel/net/packet/af_packet.ko \ "needed for dhcp"; @@ -432,8 +433,9 @@ if [ -n "$FILESRC" ] ; then tftpgetunpack $tftp $cfgfile $tftpserver else # we expect the tftp-server to serve from $SLX_TFTPBOOT_PATH, so we - # just use the relative path from that here: - cfgdir="client-config" + # fixme!!!! just use the relative path from that here: + # the variable is nowhere to be seen, so it cannot be used here!?!? + cfgdir="/tftpboot/client-conf" local tftpserver=$serverip # try to get configuration files successively; start with distro client # and try last distro default ... diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 6353d286..41a14b22 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -282,8 +282,9 @@ if [ -n "${nbdmod}" ] ; then nbd) RDEV=/dev/nbd0 waitfor "${RDEV}" 30000 || error "$init_nbddev" - echo "0" > /sys/block/nbd0/queue/read_ahead_kb - nbd-client $nbdhost $nbdport ${RDEV} || error "$init_nbdcl" + while ! nbd-client $nbdhost $nbdport ${RDEV} ; do + usleep 10 + done usleep 10 # switch off unneeded block read ahead echo "0" > /sys/block/nbd0/queue/read_ahead_kb -- cgit v1.2.3-55-g7522