From 378a8cb895309133a40f57495a4dd4f9b177c378 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Thu, 6 Apr 2006 19:58:13 +0000 Subject: minor corrections ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@171 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/etc/functions | 2 +- initrd/initrd-stuff/init | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'initrd') diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 8c8e1c8f..53056344 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -332,7 +332,7 @@ waitfor () { local file=$1 local maxwait=$2 local count=0 -while [ ! -f $file ] ; do +while [ ! -e $file ] ; do echo "waiting ........." > /dev/null count=`expr $count + 1` [ $count -gt $maxwait ] && return 1 diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index b21ffc8d..a3af01d5 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -2,11 +2,11 @@ # Description: main script for new type of initial ramdisk for # linux diskless clients version 4 # -# Author(s): Dirk von Suchodoletz , 03-04-2006 +# Author(s): Dirk von Suchodoletz , 06-04-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.4b +# Version: 0.2.4c # functions common for all distros, messages contains all error and info # output @@ -230,10 +230,13 @@ if [ -n "${NBD}" ] ; then case "${NBD}" in # network block device present in standard kernel nbd) - waitfor /dev/nbd0 10000 || error "$init_nbddev" - nbd-client $nbdhost $nbdport /dev/nbd0 || error "$init_nbdcl" RDEV=/dev/nbd0 - ;; + waitfor "${RDEV}" 15000 || error "$init_nbddev" + echo "0" > /sys/block/nbd0/queue/read_ahead_kb + nbd-client $nbdhost $nbdport ${RDEV} || error "$init_nbdcl" + # switch off unneeded block read ahead + echo "0" > /sys/block/nbd0/queue/read_ahead_kb + ;; # dnbd by Thorsten Zitterell dnbd) if [ -z $nodnbdcache ] ; then # variable not really used yet @@ -247,7 +250,7 @@ if [ -n "${NBD}" ] ; then while ! dnbd-client -b $nbdhost -d /dev/dnbd0 $clientopt ; do usleep 10 done - #echo $? + echo "0" > /sys/block/dnbd0/queue/read_ahead_kb RDEV=/dev/dnbd0 ;; esac -- cgit v1.2.3-55-g7522