diff options
author | Dirk von Suchodoletz | 2006-04-06 21:58:13 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-04-06 21:58:13 +0200 |
commit | 378a8cb895309133a40f57495a4dd4f9b177c378 (patch) | |
tree | f61dd5ff1332f941dd2d0a27c6f90a59be556d9a /initrd/initrd-stuff | |
parent | do nfs over tcp, unset env. variables after initrd (diff) | |
download | core-378a8cb895309133a40f57495a4dd4f9b177c378.tar.gz core-378a8cb895309133a40f57495a4dd4f9b177c378.tar.xz core-378a8cb895309133a40f57495a4dd4f9b177c378.zip |
minor corrections ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@171 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff')
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 2 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 15 |
2 files changed, 10 insertions, 7 deletions
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 <dirk@goe.net>, 03-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 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 |