X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fdemos%2Fbasesetup.sh;h=263e252a585d21a3deaba34df847d80241e97e28;hb=5267b98fdebd222dd16beb9bd464841dcffda324;hp=7cecc93673e32d29e5d65b8aa8a3389bf982502f;hpb=bbb126f8d22cff6180bf362487cc373facdb9274;p=fs%2Flustre-release.git diff --git a/lustre/demos/basesetup.sh b/lustre/demos/basesetup.sh index 7cecc93..263e252 100755 --- a/lustre/demos/basesetup.sh +++ b/lustre/demos/basesetup.sh @@ -1,7 +1,6 @@ #! /bin/sh # Get the locations for the files from a single place to avoid confusion OBDDIR="`dirname $0`/.." -[ "$OBDDIR" = "./.." ] && OBDDIR=".." # source config info . $OBDDIR/demos/config.sh @@ -26,7 +25,7 @@ if [ "$LOOPDEV" -a "`losetup $LOOPDEV 2> /dev/null`" ]; then echo "You need to clean up $LOOPDEV (via cleanup.sh)," echo "or you can change which device is used in demos/config.sh" 1>&2 # undo previous - rm $TMPFILE + [ "$TMPFILE" ] && rm $TMPFILE exit 2 fi @@ -42,6 +41,6 @@ if [ "$BASEDEV" ]; then else echo "\$BASEDEV not defined in demos/config.sh. Please fix!" [ "$LOOPDEV" ] && losetup -d $LOOPDEV - rm $TMPFILE + [ "$TMPFILE" ] && rm $TMPFILE exit 3 fi