no if
This commit is contained in:
parent
ef62fbbbcf
commit
d0dbebbdeb
|
@ -1565,23 +1565,15 @@ function create_backup_script {
|
||||||
echo ' exit 1' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo ' exit 1' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo "if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo "umount -f $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo ' sync' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo "mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo "mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo -n 'mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo -n 'mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo ' sync' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo " umount $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo ' sync' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo -n ' mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo ' sync' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo 'if [ ! "$?" = "0" ]; then' >> /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 " 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 " rm -rf $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo ' exit 6392' >> /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 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
|
||||||
echo "if [ ! -d $USB_MOUNT/backup ]; then" >> /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
|
echo " mkdir $USB_MOUNT/backup" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||||
|
|
Loading…
Reference in New Issue