Whamcloud - gitweb
- ext2_obd.c --- fix the bugs in read/write for Linux 2.4.3
[fs/lustre-release.git] / lustre / demos / baseclean.sh
1 #!/bin/sh
2 # Script to remove the loopback device and temp file created in newtest.sh
3 #
4 # Copyright (C) 2001  Cluster File Systems, Inc.
5 #
6 # This code is issued under the GNU General Public License.
7 # See the file COPYING in this distribution
8 OBDDIR="`dirname $0`/.."
9 . $OBDDIR/demos/config.sh
10
11
12 mount | grep "$MNTOBD " > /dev/null 2>&1
13 if [ x$? = x0 ]; then
14     echo "Stuff still mounted on $MNTOBD"
15     exit 1
16 fi
17
18 mount | grep "$MNTSNAP " > /dev/null 2>&1
19 if [ x$? = x0 ]; then
20     echo "Stuff still mounted on $MNTSNAP"
21     exit 2
22 fi
23
24 mount | grep "$MNTSNAP2 " > /dev/null 2>&1
25 if [ x$? = x0 ]; then
26     echo "Stuff still mounted on $MNTSNAP2"
27     exit 3
28 fi
29
30
31 if [ "$LOOPDEV" ]; then
32     losetup -d $LOOPDEV
33     rmmod loop > /dev/null 2>&1
34 fi
35
36 if [ "$LOOPDEV" -a "$TMPFILE" -a -f "$TMPFILE" ]; then
37     rm -i $TMPFILE
38 fi
39