1 export PATH=$PATH:/sbin:/usr/sbin
7 PTLCTL=$SRCDIR/../../portals/linux/utils/ptlctl
8 OBDCTL=$SRCDIR/../../obd/utils/obdctl
9 DEBCTL=$SRCDIR/../../portals/linux/utils/debugctl
10 ACCEPTOR=$SRCDIR/../../portals/linux/utils/acceptor
12 LOOPNUM=0; export LOOPNUM
13 if [ -b /dev/loop0 ]; then
16 if [ -b /dev/loop/0 ]; then
19 echo "Cannot find /dev/loop0 or /dev/loop/0";
26 while [ -b ${LOOP}${LOOPNUM} ]; do
27 LOOPDEV=${LOOP}${LOOPNUM}
28 losetup ${LOOPDEV} > /dev/null 2>&1 || NEXT=${LOOPDEV}
29 LOOPNUM=`expr ${LOOPNUM} + 1`
30 [ "$NEXT" ] && echo ${NEXT} && break
35 $DEBCTL modules > $R/tmp/ogdb
36 echo "The GDB module script is in /tmp/ogdb. Press enter to continue"
41 dd if=/dev/zero of=$2 bs=1k count=$3 1>&2 || exit -1
42 mkfs.$1 -b 4096 -F $2 1>&2 || exit -1
43 LOOPDEV=`next_loop_dev`
44 losetup ${LOOPDEV} $2 1>&2 || exit -1
49 LOOPDEV=`next_loop_dev`
50 losetup ${LOOPDEV} $2 1>&2 || exit -1
54 [ -c /dev/portals ] || mknod /dev/portals c 10 240
56 insmod $SRCDIR/../../portals/linux/oslib/portals.o || exit -1
57 insmod $SRCDIR/../../portals/linux/qswnal/kqswnal.o
58 insmod $SRCDIR/../../portals/linux/socknal/ksocknal.o || exit -1
60 [ "$NETWORK" = "tcp" ] && ($ACCEPTOR $PORT &)
62 [ -c /dev/obd ] || mknod /dev/obd c 10 241
64 insmod $SRCDIR/../../obd/class/obdclass.o || exit -1
65 insmod $SRCDIR/../../obd/rpc/ptlrpc.o || exit -1
66 insmod $SRCDIR/../../obd/ext2obd/obdext2.o || exit -1
67 insmod $SRCDIR/../../obd/ost/ost.o || exit -1
68 insmod $SRCDIR/../../obd/osc/osc.o || exit -1
69 insmod $SRCDIR/../../obd/obdecho/obdecho.o || exit -1
70 insmod $SRCDIR/../../obd/mds/mds.o || exit -1
71 insmod $SRCDIR/../../obd/mdc/mdc.o || exit -1
72 insmod $SRCDIR/../../obd/llight/llight.o || exit -1
76 [ -d /mnt/obd ] || mkdir /mnt/obd
80 if [ -z "$NETWORK" -o -z "$LOCALHOST" -o -z "$SERVER" ]; then
81 echo "$0: NETWORK or LOCALHOST or SERVER is not set"
86 elan) if [ "$PORT" ]; then
87 echo "$0: NETWORK is elan but PORT is set"
91 tcp) if [ -z "$PORT" ]; then
92 echo "$0: NETWORK is tcp but PORT is not set"
96 *) echo "$0: unknown NETWORK \'$NETWORK\'"
104 connect $SERVER $PORT
113 [ -c /dev/portals ] || mknod /dev/portals c 10 240
115 insmod $SRCDIR/../../portals/linux/oslib/portals.o || exit -1
117 insmod $SRCDIR/../../obd/class/obdclass.o || exit -1
118 insmod $SRCDIR/../../obd/ldlm/ldlm.o || exit -1