Whamcloud - gitweb
Fix up the echo.sh config script so that you can use it with LOV configs,
authoradilger <adilger>
Sat, 11 Jan 2003 07:43:32 +0000 (07:43 +0000)
committeradilger <adilger>
Sat, 11 Jan 2003 07:43:32 +0000 (07:43 +0000)
like "LOV=1 NAME=echo sh llmount.sh".  Note that LOV configs do not yet
work, but I know where the problem lies (we are not copying the full LOV
MD data to the user buffer primarily, although fixing this entails a bunch
of other changes I think).

lustre/tests/echo.sh

index f30f056..d869643 100755 (executable)
@@ -1,27 +1,29 @@
 #!/bin/bash
 
-config=${1:-$(basename $0 .sh).xml}
+LOV=${LOV:-0}
+while [ "$1" ]; do
+        case $1 in
+        --lov) LOV="1" ;;
+       *) [ -z $config ] && config=$1 || OPTS="$OPTS $1" ;;
+        esac
+        shift
+done
+
+config=${config:-$(basename $0 .sh).xml}
 LMC=${LMC:-../utils/lmc -m $config}
+TMP=${TMP:-/tmp}
 
-SERVER=localhost
-CLIENT=localhost
+SERVER=${SERVER:-localhost}
+CLIENT=${CLIENT:-localhost}
+NET=${NET:-tcp}
 
 # FIXME: make LMC not require MDS for obdecho LOV
-MDSDEV=$TMP/mds1
+MDSDEV=${MDSDEV:-$TMP/mds1}
 MDSSIZE=10000
 
 STRIPE_BYTES=65536
 STRIPES_PER_OBJ=2      # 0 means stripe over all OSTs
 
-LOV=0
-while [ "$1" ]; do
-        case $1 in
-        --lov) LOV="1" ;;
-       *) OPTS="$OPTS $1" ;;
-        esac
-        shift
-done
-
 rm -f $config
 # create nodes
 $LMC --add node --node $SERVER  || exit 1
@@ -34,7 +36,7 @@ if (($LOV)); then
     $LMC --add ost --node $SERVER --lov lov1 --obdtype=obdecho || exit 13
     OBD_NAME=lov1
 else
-    $LMC --add ost --obd obd1 --node $SERVER --obdtype=obdecho || exit 2
+    $LMC --add ost --obd obd1 --node $SERVER --obdtype=obdecho || exit 12
     OBD_NAME=obd1
 fi