Skip to content

Commit

Permalink
properly unmount when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas-M committed Nov 20, 2012
1 parent ff256c1 commit 4f674e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion livekitlib
Expand Up @@ -436,9 +436,10 @@ copy_to_ram()

MDIR="$(mounted_dir "$1")"
MDEV="$(mounted_device "$1")"
MDEV="$(losetup $MDEV 2>/dev/null | cut -d " " -f 3)"
umount "$MDIR" 2>/dev/null

if [ -f "$MDEV" ]; then # iso was mounted here, try to unmount the FS it resides on too
if [ "$MDEV" ]; then # iso was mounted here, try to unmount the FS it resides on too
MDEV="$(mounted_device "$MDEV")"
umount "$MDEV" 2>/dev/null
fi
Expand Down

0 comments on commit 4f674e9

Please sign in to comment.