From 98768fbd6fcf3714c9b7db50891df94e7c6bc59b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 22 Mar 2015 09:45:51 +0000 Subject: [PATCH] Extra check for usb mounting during backup --- src/freedombone | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/freedombone b/src/freedombone index 6ec1fee0..6b303624 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1569,6 +1569,11 @@ function create_backup_script { echo " mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME echo -n ' mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' if [ ! "$?" = "0" ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo " echo 'There was a problem mounting the USB drive to $USB_MOUNT'" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo " rm -rf $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' exit 6392' >> /usr/bin/$BACKUP_SCRIPT_NAME + echo ' fi' >> /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 " mkdir $USB_MOUNT/backup" >> /usr/bin/$BACKUP_SCRIPT_NAME