Unmount and remount

This commit is contained in:
Bob Mottram 2015-07-23 08:11:08 +01:00
parent 1f5177a44c
commit 15f736beac
1 changed files with 4 additions and 2 deletions

View File

@ -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