3 export PATH=`dirname $0`/../utils:$PATH
14 if [ "$PORTALS" ]; then
15 portals_opt="--portals=$PORTALS"
18 if [ "$LUSTRE" ]; then
19 lustre_opt="--lustre=$LUSTRE"
22 if [ "$LDAPURL" ]; then
23 conf_opt="--ldapurl $LDAPURL --config $NAME"
25 if [ ! -f $config ]; then
26 sh $mkconfig $config || exit 1
31 [ "$NODE" ] && node_opt="--node $NODE"
35 [ "$MOUNT2" ] && umount $MOUNT2
37 ${LCONF} $NOMOD $portals_opt $lustre_opt $node_opt --cleanup $@ \
38 --dump $TMP/debug $conf_opt
44 BUSY=`dmesg | grep -i destruct`
47 mv $TMP/debug $TMP/debug-busy.`date +%s`
50 LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"`
51 LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked"`
52 if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
53 echo "$LEAK_LUSTRE" 1>&2
54 echo "$LEAK_PORTALS" 1>&2
55 mv $TMP/debug $TMP/debug-leak.`date +%s`
58 lsmod | grep portals && echo "modules still loaded" && exit 1