From be0ec9a11b654f67e147aa8e03a785d3f09977ae Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 8 Dec 2014 23:01:00 +0000 Subject: [PATCH] Check that the backup directory was created --- install-freedombone.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install-freedombone.sh b/install-freedombone.sh index fc783571..138f9887 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -595,6 +595,12 @@ function create_backup_script { echo "if [ ! -d $USB_MOUNT/backup ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME echo " mkdir $USB_MOUNT/backup" >> /usr/bin/$BACKUP_SCRIPT_NAME echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo "if [ ! -d $USB_MOUNT/backup ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo " echo 'There was a problem making the directory $USB_MOUNT/backup.'" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo " umount $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo " rm -rf $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' exit 27' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME echo '# Put some files into a temporary directory so that they can be easily backed up' >> /usr/bin/$BACKUP_SCRIPT_NAME