Whamcloud - gitweb
- landed b_hd_cray_merge3
[fs/lustre-release.git] / lustre / tests / llmount.sh
1 #!/bin/sh
2 # suggested boilerplate for test script
3
4 export PATH=`dirname $0`/../utils:$PATH
5
6 LCONF=${LCONF:-lconf}
7 NAME=${NAME:-local}
8 LLMOUNT=${LLMOUNT:-llmount}
9 SECURITY=${SECURITY:-"null"}
10
11 config=$(dirname $0)/$NAME.xml
12 mkconfig=$(dirname $0)/$NAME.sh
13
14 . krb5_env.sh
15 start_krb5_kdc || exit 1
16
17 if [ "$PORTALS" ]; then
18     portals_opt="--portals=$PORTALS"
19 fi
20
21 if [ "$LUSTRE" ]; then
22     lustre_opt="--lustre=$LUSTRE"
23 fi
24
25 if [ "$LDAPURL" ]; then
26     conf_opt="--ldapurl $LDAPURL --config $NAME"
27 else
28     sh $mkconfig $config || exit 2
29     conf_opt="$config"
30 fi    
31
32 [ "$NODE" ] && node_opt="--node $NODE"
33 [ "$DEBUG" ] && debug_opt="--ptldebug=$DEBUG"
34
35 # We'd better start lsvcgssd after gss modules loaded.
36 # remove this if we don't depend on lsvcgssd in the future
37 ${LCONF} --nosetup --sec $SECURITY $portals_opt $node_opt $@ $conf_opt || exit 3
38 start_lsvcgssd || exit 4
39 start_lgssd || exit 5
40
41 ${LCONF} $NOMOD --sec $SECURITY $portals_opt $lustre_opt $node_opt \
42          ${REFORMAT:---reformat} $@ $conf_opt  || exit 6
43
44 if [ "$MOUNT2" ]; then
45        $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 7
46 fi
47