From 03aa0121256452040468a2e1b19a43cc9eb6f068 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 2 Oct 2014 17:47:06 +0100 Subject: [PATCH] Unmount usb drive after backup or restore --- install-freedombone.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install-freedombone.sh b/install-freedombone.sh index fca06fa0..4f70065f 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -462,7 +462,9 @@ function create_backup_script { echo ' echo "Removing temporary files"' >> /usr/bin/$BACKUP_SCRIPT_NAME echo " rm -rf /home/$MY_USERNAME/tempfiles" >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME - echo 'echo "Backup is complete"' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'sync' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'umount $USB_MOUNT' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'echo "Backup to USB drive is complete. You can now unplug it."' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'exit 0' >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'create_backup_script' >> $COMPLETION_FILE @@ -533,7 +535,9 @@ function create_restore_script { echo " duplicity --force file://$USB_MOUNT/backup/dlna /var/cache/minidlna" >> /usr/bin/$RESTORE_SCRIPT_NAME echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME - echo 'echo "Restore completed"' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo 'sync' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo 'umount $USB_MOUNT' >> /usr/bin/$RESTORE_SCRIPT_NAME + echo 'echo "Restore from USB drive is complete. You can now remove it."' >> /usr/bin/$RESTORE_SCRIPT_NAME echo 'exit 0' >> /usr/bin/$RESTORE_SCRIPT_NAME echo 'create_restore_script' >> $COMPLETION_FILE