Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lustre / tests / llmount.sh
index 7fcd68b..de20003 100755 (executable)
@@ -1,45 +1,34 @@
 #!/bin/sh
+# suggested boilerplate for test script
 
-SRCDIR="`dirname $0`"
-. $SRCDIR/common.sh
-
-NETWORK=tcp
-LOCALHOST=localhost
-SERVER=localhost
-PORT=1234
-
-setup_portals
-setup_lustre
-read
-
-new_fs ext2 /tmp/ost 10000
-OST=$LOOPDEV
-MDSFS=ext2
-new_fs ${MDSFS} /tmp/mds 10000
-MDS=$LOOPDEV
-
-echo 0xffffffff > /proc/sys/portals/debug
-
-$OBDCTL <<EOF
-device 0
-attach mds
-setup ${MDS} ${MDSFS}
-device 1
-attach obdfilter
-setup ${OST} ext2
-device 2
-attach ost
-setup 1
-device 3
-attach ptlrpc
-setup
-device 4
-attach ldlm
-setup
-device 5
-attach osc
-setup -1
-quit
-EOF
-
-mount -t lustre_lite -o device=5 none /mnt/lustre
+LCONF=${LCONF:-../utils/lconf}
+NAME=${NAME:-local}
+
+config=$NAME.xml
+mkconfig=$NAME.sh
+
+if [ "$PORTALS" ]; then
+  portals_opt="--portals=$PORTALS"
+fi
+
+if [ "$LUSTRE" ]; then
+  lustre_opt="--lustre=$LUSTRE"
+fi
+
+if [ "$LDAPURL" ]; then
+    conf_opt="--ldapurl $LDAPURL --config $NAME"
+else
+    sh $mkconfig $config || exit 1
+    conf_opt="$config"
+fi    
+
+[ "$NODE" ] && node_opt="--node $NODE"
+
+if [ "$1" = "-v" ]; then
+  verbose="-v"
+fi
+
+[ -x $LCONF ] || chmod a+rx $LCONF
+
+${LCONF} $portals_opt $lustre_opt $node_opt --reformat --gdb \
+    $verbose $conf_opt  || exit 2