Whamcloud - gitweb
Fix a few compiler warnings.
[fs/lustre-release.git] / lustre / demos / baseclean.sh
index 0daf84b..93730ee 100755 (executable)
@@ -1,5 +1,10 @@
 #!/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
 
@@ -23,11 +28,12 @@ if [ x$? = x0 ]; then
 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