-SRCDIR="`dirname $0`"
-. $SRCDIR/common.sh
-
-NETWORK=tcp
-LOCALHOST=localhost
-SERVER=localhost
-PORT=1234
-
-setup
-setup_portals
-
-new_fs ext2 /tmp/ost 250000
-OST=$LOOPDEV
-MDSFS=ext2
-new_fs ${MDSFS} /tmp/mds 10000
-MDS=$LOOPDEV
-
-echo 0xffffffff > /proc/sys/portals/debug
-
-$OBDCTL <<EOF
-device 0
-attach mds
-setup ${MDS} ${MDSFS}
-device 1
-attach obdext2
-setup ${OST}
-device 2
-attach ost
-setup 1
-device 3
-attach osc
-setup -1
-quit
-EOF
-
-#mount -t lustre_light -o device=3 none /mnt/obd
+LCONF=${LCONF:-../utils/lconf}
+NAME=${NAME:-local}
+
+config=$NAME.xml
+mkconfig=$NAME.sh
+
+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
+ sh $mkconfig $config || exit 1
+ conf_opt="$config"
+fi
+
+[ "$NODE" ] && node_opt="--node $NODE"
+
+if [ "$1" = "-v" ]; then
+ verbose="-v"
+fi
+
+[ -x $LCONF ] || chmod a+rx $LCONF
+
+${LCONF} $portals_opt $lustre_opt $node_opt --reformat --gdb \
+ $verbose $conf_opt || exit 2