Whamcloud - gitweb
land lustre part of b_hd_sec on HEAD.
[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=$NAME.xml
12 mkconfig=$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
34 # We'd better start lsvcgssd after gss modules loaded.
35 # remove this if we don't depend on lsvcgssd in the future
36 ${LCONF} --nosetup --sec $SECURITY $portals_opt $node_opt $@ $conf_opt || exit 3
37 start_lsvcgssd || exit 4
38 start_lgssd || exit 5
39
40 ${LCONF} $NOMOD --sec $SECURITY $portals_opt $lustre_opt $node_opt \
41          ${REFORMAT:---reformat} $@ $conf_opt  || exit 6
42
43 if [ "$MOUNT2" ]; then
44        $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 7
45 fi
46