#!/bin/sh
# Script to remove the loopback device and temp file created in newtest.sh
+#
+# Copyright (C) 2001 Cluster File Systems, Inc.
+#
+# This code is issued under the GNU General Public License.
+# See the file COPYING in this distribution
OBDDIR="`dirname $0`/.."
. $OBDDIR/demos/config.sh
fi
-[ "$LOOPDEV" ] && losetup -d $LOOPDEV
-rmmod loop > /dev/null 2>&1
+if [ "$LOOPDEV" ]; then
+ losetup -d $LOOPDEV
+ rmmod loop > /dev/null 2>&1
+fi
-if [ "$TMPFILE" -a -f "$TMPFILE" ]; then
- echo -n "Remove $TMPFILE [N/y]? "
+if [ "$LOOPDEV" -a "$TMPFILE" -a -f "$TMPFILE" ]; then
rm -i $TMPFILE
fi