From 15f736beace2280e826ed3a2c9b63910c96ae73c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 23 Jul 2015 08:11:08 +0100 Subject: [PATCH] Unmount and remount --- src/freedombone-prep | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/freedombone-prep b/src/freedombone-prep index 6da3f529..51420ec7 100755 --- a/src/freedombone-prep +++ b/src/freedombone-prep @@ -181,9 +181,11 @@ $SUDO dd if=$DEBIAN_FILE_NAME.img of=$MICROSD_DRIVE sync sleep 5 -if [ ! -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then - $SUDO mkdir -p $MICROSD_MOUNT_POINT/$ROOTFS +if [ -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then + umount $MICROSD_MOUNT_POINT/$ROOTFS + $SUDO rm $MICROSD_MOUNT_POINT/$ROOTFS fi +$SUDO mkdir -p $MICROSD_MOUNT_POINT/$ROOTFS $SUDO mount ${MICROSD_DRIVE}1 $MICROSD_MOUNT_POINT/$ROOTFS sync