Whamcloud - gitweb
fc6a8711dd828a87267c0168672add3087fe9591
[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 OBDDIR="`dirname $0`/.."
4 . $OBDDIR/demos/config.sh
5
6
7 mount | grep "$MNTOBD " > /dev/null 2>&1
8 if [ x$? = x0 ]; then
9     echo "Stuff still mounted on $MNTOBD"
10     exit 1
11 fi
12
13 mount | grep "$MNTSNAP " > /dev/null 2>&1
14 if [ x$? = x0 ]; then
15     echo "Stuff still mounted on $MNTSNAP"
16     exit 2
17 fi
18
19 mount | grep "$MNTSNAP2 " > /dev/null 2>&1
20 if [ x$? = x0 ]; then
21     echo "Stuff still mounted on $MNTSNAP2"
22     exit 3
23 fi
24
25
26 [ "$LOOPDEV" ] && losetup -d $LOOPDEV
27 rmmod loop > /dev/null 2>&1
28
29 # [ "$TMPFILE" -a -f "$TMPFILE" ] && rm $TMPFILE
30