aboutsummaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2017-05-22 18:35:03 -0400
committerB Stack <bgstack15@gmail.com>2017-05-22 18:35:03 -0400
commit5c09c3da7ef95d16d5c9b52a133af712a4eb4a9f (patch)
tree89b528f16489ca2a0e3408d04ebdb448251c4685 /usr
parentdeleted rbup.sh backups (diff)
downloadrbup-5c09c3da7ef95d16d5c9b52a133af712a4eb4a9f.tar.gz
rbup-5c09c3da7ef95d16d5c9b52a133af712a4eb4a9f.tar.bz2
rbup-5c09c3da7ef95d16d5c9b52a133af712a4eb4a9f.zip
added RBUP_MOUNT_POINT; also some extra debugging
Diffstat (limited to 'usr')
-rwxr-xr-xusr/share/rbup/rbup.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/share/rbup/rbup.sh b/usr/share/rbup/rbup.sh
index b0ad329..3717ca3 100755
--- a/usr/share/rbup/rbup.sh
+++ b/usr/share/rbup/rbup.sh
@@ -246,16 +246,33 @@ fi
${RBUP_DEST_MOUNT_CMD} && debuglev 2 && ferror "Mount successful."
fi
+ # Ensure mount is mounted
+ if test -n "${RBUP_MOUNT_POINT}";
+ then
+ if mount | grep -q -- "${RBUP_MOUNT_POINT}";
+ then
+ :
+ else
+ ferror "ERROR 8. Failed to mount: ${RBUP_MOUNT_POINT}."
+ ferror "Aborted."
+ exit 8
+ fi
+ fi
+
# Determine apply and verbose states
applystate="${RBUP_SYNC_OPT_NOT_APPLY}"
verbosestate="${RBUP_SYNC_OPT_NOT_VERBOSE}"
fistruthy "${RBUP_ENABLED}" && applystate="${RBUP_SYNC_OPT_APPLY}"
fistruthy "${RBUP_VERBOSE}" && verbosestate="${RBUP_SYNC_OPT_VERBOSE}"
+ # Prepare full command
fullcommand="$( echo "${RBUP_SYNC_CMD} ${RBUP_SYNC_OPTS} ${applystate} ${verbosestate} ${RBUP_SOURCE} ${RBUP_DEST}" | sed -r -e 's/[[:space:]]+/ /g;' )"
# Run sync
- debuglev 1 && ferror "${fullcommand}"
+ debuglev 1 && {
+ ferror "Executing:"
+ ferror "${fullcommand}"
+ }
${fullcommand}
# Unmount destination
bgstack15