From: sebt3 Date: Thu, 2 Jun 2011 23:24:45 +0000 (-0400) Subject: Forgot a "fi" !!! X-Git-Tag: sz_beta3~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=commitdiff_plain;h=fb72a850a1074877058fd56dbd2f76f042ec1783 Forgot a "fi" !!! --- diff --git a/testdata/scripts/pnd_run.sh b/testdata/scripts/pnd_run.sh index d521849..62b8ebb 100755 --- a/testdata/scripts/pnd_run.sh +++ b/testdata/scripts/pnd_run.sh @@ -284,7 +284,7 @@ noMoreProcessUnion() { } mountPnd() { - MOUNT_TARGET=${1:-$PND_MOUNT_DIR} + MOUNT_TARGET="${1:-$PND_MOUNT_DIR}" if ! is_pnd_mounted;then #check if pnd is already attached to loop LOOP=$(losetup -a | grep "$PND" | tail -n1 | awk -F: '{print $1}') @@ -458,18 +458,22 @@ cleanups() { } umountPnd() { + MOUNT_TARGET="${1:-$PND_MOUNT_DIR}" if is_pnd_mounted;then PND_WaitFor noMoreProcessPnd "Waiting the PND mount dir to be free" - umount "$PND_MOUNT_DIR/$PND_NAME" + umount "$MOUNT_TARGET/$PND_NAME" fi if is_pnd_mounted; then echo WARNING umount PND failed, didnt clean up. Process still using this FS : - list_using_fs "$PND_MOUNT_DIR/$PND_NAME" + list_using_fs "$MOUNT_TARGET/$PND_NAME" show_mounted_info else # removing the now useless mountpoint - if [ -d $PND_MOUNT_DIR/$PND_NAME ];then - rmdir "$PND_MOUNT_DIR/$PND_NAME" + if [ -d "$MOUNT_TARGET/$PND_NAME" ];then + rmdir "$MOUNT_TARGET/$PND_NAME" + fi + if [ -h "$PND_MOUNT_DIR/$PND_NAME" ];then + rm "$PND_MOUNT_DIR/$PND_NAME" fi # All went well, cleaning @@ -504,7 +508,7 @@ umountUnion() { fi fi # Try umounting the PND - umountPnd + umountPnd $UNION_MOUNT_DIR fi } @@ -538,6 +542,7 @@ runApp() { "$EXENAME" $ARGUMENTS else "./$EXENAME" $ARGUMENTS + fi RC=$? #the app could have exited now, OR it went into bg, we still need to wait in that case till it really quits!