Whamcloud - gitweb
land lustre part of b_hd_sec on HEAD.
[fs/lustre-release.git] / lustre / tests / llrmount.sh
index 0199d07..3de7fcf 100755 (executable)
@@ -1,44 +1,48 @@
 #!/bin/sh
 
-SRCDIR="`dirname $0`"
-. $SRCDIR/common.sh
-
-NETWORK=tcp
-LOCALHOST=localhost
-SERVER=localhost
-PORT=1234
-
-setup_portals
-setup_lustre
-
-old_fs ext2 /tmp/ost 80000
-OST=$LOOPDEV
-MDSFS=ext2
-old_fs ${MDSFS} /tmp/mds 10000
-MDS=$LOOPDEV
-
-echo 0xffffffff > /proc/sys/portals/debug
-
-$OBDCTL <<EOF
-device 0
-attach mds MDSDEV
-setup ${MDS} ${MDSFS}
-device 1
-attach obdfilter OBDDEV
-setup ${OST} ext2
-device 2
-attach ost OSTDEV
-setup 1
-device 3
-attach ptlrpc RPCDEV
-setup
-device 4
-attach ldlm LDLMDEV
-setup
-device 5
-attach osc OSCDEV
-setup -1
-quit
-EOF
-
-mount -t lustre_lite -o device=5 none /mnt/lustre
+export PATH=`dirname $0`/../utils:$PATH
+
+LCONF=${LCONF:-lconf}
+NAME=${NAME:-local}
+LLMOUNT=${LLMOUNT:-llmount}
+SECURITY=${SECURITY:-"null"}
+
+config=$NAME.xml
+mkconfig=$NAME.sh
+
+. krb5_env.sh
+
+start_krb5_kdc || exit 1
+
+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
+    if [ ! -f $config -o $mkconfig -nt $config ]; then
+       sh $mkconfig $config || exit 2
+    fi
+    conf_opt="$config"
+fi    
+
+[ "$NODE" ] && node_opt="--node $NODE"
+
+# We'd better start lsvcgssd after gss modules loaded.
+# remove this if we don't depend on lsvcgssd in the future
+${LCONF} --nosetup --sec $SECURITY $portals_opt $node_opt $@ $conf_opt || exit 3
+start_lsvcgssd || exit 4
+start_lgssd || exit 5
+
+${LCONF} $NOMOD --sec $SECURITY $portals_opt $lustre_opt $node_opt \
+         $@ $conf_opt  || exit 6
+
+if [ "$MOUNT2" ]; then
+       $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 7
+fi
+