Whamcloud - gitweb
land lustre part of b_hd_sec on HEAD.
[fs/lustre-release.git] / lustre / tests / llrmount.sh
1 #!/bin/sh
2
3 export PATH=`dirname $0`/../utils:$PATH
4
5 LCONF=${LCONF:-lconf}
6 NAME=${NAME:-local}
7 LLMOUNT=${LLMOUNT:-llmount}
8 SECURITY=${SECURITY:-"null"}
9
10 config=$NAME.xml
11 mkconfig=$NAME.sh
12
13 . krb5_env.sh
14
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     if [ ! -f $config -o $mkconfig -nt $config ]; then
29         sh $mkconfig $config || exit 2
30     fi
31     conf_opt="$config"
32 fi    
33
34 [ "$NODE" ] && node_opt="--node $NODE"
35
36 # We'd better start lsvcgssd after gss modules loaded.
37 # remove this if we don't depend on lsvcgssd in the future
38 ${LCONF} --nosetup --sec $SECURITY $portals_opt $node_opt $@ $conf_opt || exit 3
39 start_lsvcgssd || exit 4
40 start_lgssd || exit 5
41
42 ${LCONF} $NOMOD --sec $SECURITY $portals_opt $lustre_opt $node_opt \
43          $@ $conf_opt  || exit 6
44
45 if [ "$MOUNT2" ]; then
46        $LLMOUNT -v -o sec=$SECURITY `hostname`:/mds1/client $MOUNT2 || exit 7
47 fi
48